2017 © Pedro Peláez
 

library freezable

Freeze values in objects

image

clippings/freezable

Freeze values in objects

  • Wednesday, August 9, 2017
  • by hkdobrev
  • Repository
  • 12 Watchers
  • 2 Stars
  • 37,927 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 13 % Grown

The README.md

Freezable

Build Status Scrutinizer Code Quality Code Coverage Latest Stable Version Latest Unstable Version Total Downloads License, (*1)

Freeze values in objects, (*2)

Requires PHP 5.4 or above., (*3)

Usage

``` php <?php, (*4)

use Clippings\Freezable\FreezableTrait;, (*5)

class Item {, (*6)

use FreezableTrait;

private $value = NULL;

public function performFreeze()
{
    $this->value = $this->computeValue();
}

public function performUnfreeze()
{
    $this->value = NULL;
}

private function computeValue()
{
    // computation from external sources, database, other objects etc.
    return pi() * pi();
}

public function getValue()
{
    return $this->isFrozen() ? $this->value : $this->computeValue();
}

} ```, (*7)

License

Copyright (c) 2014, Clippings Ltd. Developed by Ivan Kerin & Haralan Dobrev, (*8)

Under BSD-3-Clause license, read LICENSE file., (*9)

The Versions

09/08 2017

dev-master

9999999-dev

Freeze values in objects

  Sources   Download

BSD-3-Clause

The Requires

  • php ^7

 

The Development Requires

17/10 2014

0.2.0

0.2.0.0

Freeze values in objects

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.4

 

13/10 2014

0.1.0

0.1.0.0

Freeze values in objects

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.4