2017 © Pedro PelĂĄez
 

library states

Library to create PHP classes following the State pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and this improve maintainability and workflows writing.

image

unialteri/states

Library to create PHP classes following the State pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and this improve maintainability and workflows writing.

  • Saturday, June 9, 2018
  • by frenchcomp
  • Repository
  • 3 Watchers
  • 9 Stars
  • 969 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 83 Versions
  • 0 % Grown

The README.md

Teknoo Software - States library

Latest Stable Version Latest Unstable Version Total Downloads License PHPStan, (*1)

States allows you to create PHP classes following the State Pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and this improve maintainability and workflows writing., (*2)

Features

  • Create Several States : Split classes in states to avoid ununderstable large monolithic statements.
  • Inherit States and Classes : Complete and factorize states thanks to inheritance.
    • Stated classes can be also inherited.
  • Automate States Switching : Define states switching rules based on object's properties.
  • Implement Every Where: Thanks to traits and interfaces, use this pattern on your existant code.
    • Compatible with Doctrine.

A complete documentation is available in documentation/README.md, (*3)

Quick Example

<?php

declare(strict_types=1);

require 'vendor/autoload.php';

use Teknoo\States\Automated\AutomatedInterface;
use Teknoo\States\Automated\AutomatedTrait;
use Teknoo\States\Automated\Assertion\Property;
use Teknoo\States\Automated\Assertion\Property\IsEqual;
use Teknoo\States\Proxy\ProxyInterface;
use Teknoo\States\Proxy\ProxyTrait;
use Teknoo\States\State\AbstractState;

class English extends AbstractState
{
    public function sayHello(): \Closure
    {
        return function(): string {
            return 'Good morning, '.$this->name;
        };
    }

    public function displayDate(): \Closure
    {
        return function(\DateTime $now): string {
            return $now->format('m d, Y');
        };
    }
}

class French extends AbstractState
{
    public function sayHello(): \Closure
    {
        return function(): string {
            return 'Bonjour, '.$this->name;
        };
    }

    public function displayDate(): \Closure
    {
        return function(\DateTime $now): string {
            return $now->format('d m Y');
        };
    }
}

class Person implements ProxyInterface, AutomatedInterface
{
    use ProxyTrait;
    use AutomatedTrait;

    private string $name;

    private string $country;

    public function __construct()
    {
        $this->initializeStateProxy();
    }

    protected static function statesListDeclaration(): array
    {
        return [
            English::class,
            French::class
        ];
    }

    protected function listAssertions(): array
    {
        return [
            (new Property([English::class]))
                ->with('country', new IsEqual('en')),
            (new Property([French::class]))
                ->with('country', new IsEqual('fr')),
        ];
    }

    public function setName(string $name): Person
    {
        $this->name = $name;

        return $this;
    }

    public function setCountry(string $country): Person
    {
        $this->country = $country;
        $this->updateStates();

        return $this;
    }
}

$frenchMan = new Person();
$frenchMan->setCountry('fr');
$frenchMan->setName('Roger');

$englishMan = new Person();
$englishMan->setCountry('en');
$englishMan->setName('Richard');

$now = new \DateTime('2022-07-01');

foreach ([$frenchMan, $englishMan] as $man) {
    echo $man->sayHello().PHP_EOL;
    echo 'Date: '.$man->displayDate($now).PHP_EOL;
}

//Display
//Bonjour, Roger
//Date: 01 07 2022
//Good morning, Richard
//Date: 07 01, 2022

Full Example

An example of using this library is available in the folder : Demo., (*4)

Support this project

This project is free and will remain free. It is fully supported by the activities of the EIRL. If you like it and help me maintain it and evolve it, don't hesitate to support me on Patreon or Github., (*5)

Thanks :) Richard., (*6)

Credits

EIRL Richard DĂ©loge - https://deloge.io - Lead developer. SASU Teknoo Software - https://teknoo.software, (*7)

About Teknoo Software

Teknoo Software is a PHP software editor, founded by Richard DĂ©loge, as part of EIRL Richard DĂ©loge. Teknoo Software's goals : Provide to our partners and to the community a set of high quality services or software, sharing knowledge and skills., (*8)

License

State is licensed under the MIT License - see the licenses folder for details., (*9)

Installation & Requirements

To install this library with composer, run this command :, (*10)

composer require teknoo/states

This library requires :, (*11)

* PHP 8.1+
* A PHP autoloader (Composer is recommended)
* Teknoo/Immutable (for Automated features).

A complete documentation is available in documentation/README.md, (*12)

News from Teknoo State 6.0

This library requires PHP 8.1 or newer. Some change causes bc breaks :, (*13)

  • Replace StateInterface::VISIBILITY_* by Enum Visibility in same namespace.
  • Use readonly behavior on immutables objects' classes.
  • Prevent bug of mutability on automated features with Property and ConstraintsSet.
  • ProxyInterface::DEFAULT_STATE_NAME is now final

News from Teknoo State 5.0

This library requires PHP 8.0 or newer. Some change causes bc breaks :, (*14)

  • Constructor Property Promotion
  • Non-capturing catches
  • Some optimisations on array functions to limit O(n)

News from Teknoo State 4.0

This library requires PHP 7.4 or newer. Some change causes bc breaks :, (*15)

  • PHP 7.4 is the minimum required
  • Most methods have been updated to include type hints where applicable. Please check your extension points to make sure the function signatures are correct. _ All files use strict typing. Please make sure to not rely on type coercion.
  • Switch to typed properties
  • Remove some PHP useless DockBlocks
  • Replace array_merge by "..." operators
  • Enable PHPStan in QA Tools and disable PHPMd
  • Add PHPStan extension dedicated to support Stated classes analyze and avoid false positive.

Quick How-to to implement your first stated class

Quick How-to to learn how to use this library : Startup., (*16)

Evolutions in 3.x versions

From the version 3.2, the internal api has been redesigned to * Following #East programming rules. * Remove all public "getter" able to return the internal state of the object. * Clean dead code and simplify the behavior of the library. * Method are bound and executed by states managing object instead of object itself, but result is injected into the object. * This behavior allows developers to execute several implementations for a called method (but only one result must be injected). * Import from the extension teknoo/states-life-cyclable all automated feature. This implementation follows also the #east programming. * teknoo/states-life-cyclable is deprecated and not compatible with this library since 3.2., (*17)

From the version 3.1, this library provide base implementation for doctrine from teknoo/statesBundle. * teknoo/statesBundle is deprecated and not compatible with this library since 3.1., (*18)

From the version 3.0, this library has been redesigned to * States's method are now builders of closure : They must return a closure, bindable with \Closure::call(). The Reflection API is no longer used to get a closure. * The library uses \Closure::call() instead of \Closure::rebindTo(), more efficient.
* States's class must be referenced declared in the proxy class, via the static method statesListDeclaration(). * Factories and Loaders are removed, they have become useless. * Proxy standard can be now directly instantiate. Integrated proxy are also removed., (*19)

From the version 2.0, this library has been redesigned to * Reuse all composer's autoloader features instead internal autoloader. * Reduce the number of necessary components to the internal functioning of this library (Dependency Injector, Closure Injector). * Forbid the usage of slows functions like call_user_func. * Use Scalar Type Hinting to use PHP Engine's check instead if statements., (*20)

Contribute :)

You are welcome to contribute to this project. Fork it on Github, (*21)

The Versions

09/06 2018

dev-master

9999999-dev http://teknoo.software/states

Library to create PHP classes following the State pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and this improve maintainability and workflows writing.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states workflow state pattern behavioral software design pattern

09/06 2018

dev-states-3.2

dev-states-3.2 http://teknoo.software/states

Library to create PHP classes following the State pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and this improve maintainability and workflows writing.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states workflow state pattern behavioral software design pattern

25/02 2018

3.2.2

3.2.2.0 http://teknoo.software/states

Library to create PHP classes following the State pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and this improve maintainability.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

23/02 2018

3.2.1

3.2.1.0 http://teknoo.software/states

Library to create PHP classes following the State pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and this improve maintainability.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

01/01 2018

3.2.0

3.2.0.0 http://teknoo.software/states

Library to create PHP classes following the State pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and this improve maintainability.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

23/12 2017

3.2.0-beta6

3.2.0.0-beta6 http://teknoo.software/states

Library to create PHP classes following the State pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and this improve maintainability.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

22/11 2017

3.2.0-beta5

3.2.0.0-beta5 http://teknoo.software/states

Library to create PHP classes following the State pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and this improve maintainability.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

12/11 2017

3.2.0-beta4

3.2.0.0-beta4 http://teknoo.software/states

Library to create PHP classes following the State pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and this improve maintainability.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

11/11 2017

3.2.0-beta3

3.2.0.0-beta3 http://teknoo.software/states

Library to create PHP classes following the State pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and this improve maintainability.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

02/11 2017

3.2.0-beta2

3.2.0.0-beta2 http://teknoo.software/states

Library to create PHP classes following the State pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and this improve maintainability.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

29/10 2017

3.2.0-beta1

3.2.0.0-beta1 http://teknoo.software/states

Library to create PHP classes following the State pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and this improve maintainability.

  Sources   Download

MIT

The Requires

  • php ~7.1

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

29/10 2017

dev-states-3.0

dev-states-3.0 http://teknoo.software/states

Library to create PHP classes following the State pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and this improve maintainability.

  Sources   Download

MIT

The Requires

  • php ~7.0

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

29/10 2017

3.1.0

3.1.0.0 http://teknoo.software/states

Library to create PHP classes following the State pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and this improve maintainability.

  Sources   Download

MIT

The Requires

  • php ~7.0

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

12/10 2017

3.1.0-rc1

3.1.0.0-RC1 http://teknoo.software/states

Library to create PHP classes following the State pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and this improve maintainability.

  Sources   Download

MIT

The Requires

  • php ~7.0

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

01/10 2017

3.1.0-beta3

3.1.0.0-beta3 http://teknoo.software/states

Library to create PHP classes following the State pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and this improve maintainability.

  Sources   Download

MIT

The Requires

  • php ~7.0

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

25/07 2017

3.1.0-beta2

3.1.0.0-beta2 http://teknoo.software/states

Library to create PHP classes following the State pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and this improve maintainability.

  Sources   Download

MIT

The Requires

  • php ~7.0

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

30/06 2017

3.1.0-beta1

3.1.0.0-beta1 http://teknoo.software/states

Library to create PHP classes following the State pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and this improve maintainability.

  Sources   Download

MIT

The Requires

  • php ~7.0

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

20/05 2017

dev-next

dev-next http://teknoo.software/states

Library to create PHP classes following the State pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and this improve maintainability.

  Sources   Download

MIT

The Requires

  • php ~7.0

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

15/02 2017

3.0.1

3.0.1.0 http://teknoo.software/states

Library to create PHP classes following the State pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and this improve maintainability.

  Sources   Download

MIT

The Requires

  • php ~7.0

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

05/01 2017

3.0.0

3.0.0.0 http://teknoo.software/states

Library to create PHP classes following the State pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and this improve maintainability.

  Sources   Download

MIT

The Requires

  • php ~7.0

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

21/12 2016

3.0.0-beta1

3.0.0.0-beta1 http://teknoo.software/states

Library to create PHP classes following the State pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and this improve maintainability.

  Sources   Download

MIT

The Requires

  • php ~7.0

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

31/10 2016

3.0.0-alpha4

3.0.0.0-alpha4 http://teknoo.software/states

Library to create PHP classes following the State pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and this improve maintainability.

  Sources   Download

MIT

The Requires

  • php ~7.0

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

27/10 2016

3.0.0-alpha3

3.0.0.0-alpha3 http://teknoo.software/states

Library to create PHP classes following the State pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and this improve maintainability.

  Sources   Download

MIT

The Requires

  • php ~7.0

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

07/10 2016

3.0.0-alpha2

3.0.0.0-alpha2 http://teknoo.software/states

Library to create PHP classes following the State pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and this improve maintainability.

  Sources   Download

MIT

The Requires

  • php ~7.0

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

03/10 2016

dev-states-2.0

dev-states-2.0 http://teknoo.software/states

Library to create PHP classes following the State pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and thus improve maintainability.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

03/10 2016

2.1.1

2.1.1.0 http://teknoo.software/states

Library to create PHP classes following the State pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and thus improve maintainability.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

03/10 2016

3.0.0-alpha1

3.0.0.0-alpha1 http://teknoo.software/states

Library to create PHP classes following the State pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and thus improve maintainability.

  Sources   Download

MIT

The Requires

  • php ~7.0

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

23/08 2016

2.1.0

2.1.0.0 http://teknoo.software/states

Library to create PHP classes following the State pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and thus improve maintainability.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

04/08 2016

2.0.6

2.0.6.0 http://teknoo.software/states

Library to create PHP classes following the State pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and thus improve maintainability.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

26/07 2016

2.0.5

2.0.5.0 http://teknoo.software/states

Library to create PHP classes following the State pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and thus improve maintainability.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

26/07 2016

dev-legacy

dev-legacy http://teknoo.software/states

Library to create PHP classes following the State pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and thus improve maintainability.

  Sources   Download

MIT GPL-3.0+

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

26/07 2016

2.0.4

2.0.4.0 http://teknoo.software/states

Library to create PHP classes following the State pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and thus improve maintainability.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

09/04 2016

2.0.3

2.0.3.0 http://teknoo.software/states

Library to create PHP classes following the State pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and thus improve maintainability.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

26/02 2016

2.0.2

2.0.2.0 http://teknoo.software/states

Library to create PHP classes following the State pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and thus improve maintainability.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

21/02 2016

2.0.1

2.0.1.0 http://teknoo.software/states

Library to create PHP classes following the State pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and thus improve maintainability.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

11/02 2016

2.0.0

2.0.0.0 http://teknoo.software/states

Library to create PHP classes following the State pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and thus improve maintainability.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

02/02 2016

2.0.0-rc5

2.0.0.0-RC5 http://teknoo.software/states

Library to create PHP classes following the State pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and thus improve maintainability.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

01/02 2016

1.2.3

1.2.3.0 http://teknoo.software/states

Library to create PHP classes following the State pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and thus improve maintainability.

  Sources   Download

MIT GPL-3.0+

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

27/01 2016

1.2.2

1.2.2.0 http://teknoo.software/states

Library to create PHP classes following the State pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and thus improve maintainability.

  Sources   Download

MIT GPL-3.0+

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

20/01 2016

2.0.0-rc4

2.0.0.0-RC4 http://teknoo.software/states

Library to create PHP classes following the State pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and thus improve maintainability.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

19/01 2016

2.0.0-rc3

2.0.0.0-RC3 http://teknoo.software/states

Library to create PHP classes following the State pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and thus improve maintainability.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

12/01 2016

2.0.0-rc2

2.0.0.0-RC2 http://teknoo.software/states

Library to create PHP classes following the State pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and thus improve maintainability.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

12/01 2016

1.2.1

1.2.1.0 http://teknoo.software/states

Library to create PHP classes following the State pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and thus improve maintainability.

  Sources   Download

MIT GPL-3.0+

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

05/12 2015

1.2.0

1.2.0.0 http://teknoo.software/states

Library to create PHP classes following the State pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and thus improve maintainability.

  Sources   Download

MIT GPL-3.0+

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

05/12 2015

2.0.0-rc1

2.0.0.0-RC1 http://teknoo.software/states

Library to create PHP classes following the State pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and thus improve maintainability.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

29/11 2015

1.2.0-rc6

1.2.0.0-RC6 http://teknoo.software/states

Library to create PHP classes following the State pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and thus improve maintainability.

  Sources   Download

MIT GPL-3.0+

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

29/11 2015

2.0.0-beta18

2.0.0.0-beta18 http://teknoo.software/states

Library to create PHP classes following the State pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and thus improve maintainability.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

31/10 2015

2.0.0-beta17

2.0.0.0-beta17 http://teknoo.software/states

Library to create PHP classes following the State pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and thus improve maintainability.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

29/10 2015

1.2.0-rc5

1.2.0.0-RC5 http://teknoo.software/states

Library to create PHP classes following the State pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and thus improve maintainability.

  Sources   Download

MIT GPL-3.0+

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

27/10 2015

2.0.0-beta16

2.0.0.0-beta16 http://teknoo.software/states

Library to create PHP classes following the State pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and thus improve maintainability.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

27/10 2015

1.2.0-rc4

1.2.0.0-RC4 http://teknoo.software/states

Library to create PHP classes following the State pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and thus improve maintainability.

  Sources   Download

MIT GPL-3.0+

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

15/10 2015

2.0.0-beta15

2.0.0.0-beta15 http://teknoo.it/states

Library to create PHP classes following the State pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and thus improve maintainability.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

15/10 2015

1.2.0-rc3

1.2.0.0-RC3 http://teknoo.it/states

Library to create PHP classes following the State pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and thus improve maintainability.

  Sources   Download

MIT GPL-3.0+

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

07/10 2015

2.0.0-beta14

2.0.0.0-beta14 http://teknoo.it/states

Library to create PHP classes following the State pattern and to create easily and cleanly classes with several states, written in distinct codes blocks with PHP 7+.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

07/10 2015

1.2.0-rc2

1.2.0.0-RC2 http://teknoo.it/states

Library to create PHP classes following the State pattern and to create easily and cleanly classes with several states, written in distinct codes blocks with PHP 5.4+.

  Sources   Download

MIT GPL-3.0+

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

29/09 2015

2.0.0-beta13

2.0.0.0-beta13 http://teknoo.it/states

Library to create PHP classes following the State pattern and to create easily and cleanly classes with several states, written in distinct codes blocks with PHP 7+.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

13/09 2015

1.2.0-rc1

1.2.0.0-RC1 http://teknoo.it/states

Library to create PHP classes following the State pattern and to create easily and cleanly classes with several states, written in distinct codes blocks with PHP 5.4+.

  Sources   Download

MIT GPL-3.0+

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

05/09 2015

2.0.0-beta12

2.0.0.0-beta12 http://teknoo.it/states

Library to create PHP classes following the State pattern and to create easily and cleanly classes with several states, written in distinct codes blocks with PHP 7+.

  Sources   Download

MIT GPL-3.0+

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

28/08 2015

2.0.0-beta11

2.0.0.0-beta11 http://teknoo.it/states

Library to create PHP classes following the State pattern and to create easily and cleanly classes with several states, written in distinct codes blocks with PHP 7+.

  Sources   Download

MIT GPL-3.0+

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

28/08 2015

1.2.0-beta7

1.2.0.0-beta7 http://teknoo.it/states

Library to create PHP classes following the State pattern and to create easily and cleanly classes with several states, written in distinct codes blocks with PHP 5.4+.

  Sources   Download

MIT GPL-3.0+

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

25/08 2015

2.0.0-beta10

2.0.0.0-beta10 http://teknoo.it/states

Library to create PHP classes following the State pattern and to create easily and cleanly classes with several states, written in distinct codes blocks with PHP 7+.

  Sources   Download

MIT GPL-3.0+

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

16/08 2015

2.0.0-beta9

2.0.0.0-beta9 http://teknoo.it/states

Library to create PHP classes following the State pattern and to create easily and cleanly classes with several states, written in distinct codes blocks with PHP 7+.

  Sources   Download

MIT GPL-3.0+

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

27/07 2015

2.0.0-beta8

2.0.0.0-beta8 http://teknoo.it/states

Library to create PHP classes following the State pattern and to create easily and cleanly classes with several states, written in distinct codes blocks with PHP 7+.

  Sources   Download

MIT GPL-3.0+

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

27/07 2015

1.2.0-beta6

1.2.0.0-beta6 http://teknoo.it/states

Library to create PHP classes following the State pattern and to create easily and cleanly classes with several states, written in distinct codes blocks with PHP 5.4+.

  Sources   Download

MIT GPL-3.0+

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

21/07 2015

2.0.0-beta7

2.0.0.0-beta7 http://teknoo.it/states

Library to create PHP classes following the State pattern and to create easily and cleanly classes with several states, written in distinct codes blocks with PHP 7+.

  Sources   Download

MIT GPL-3.0+

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

21/07 2015

1.2.0-beta5

1.2.0.0-beta5 http://teknoo.it/states

Library to create PHP classes following the State pattern and to create easily and cleanly classes with several states, written in distinct codes blocks with PHP 5.4+.

  Sources   Download

MIT GPL-3.0+

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

20/07 2015

1.2.0-beta4

1.2.0.0-beta4 http://teknoo.it/states

Library to create PHP classes following the State pattern and to create easily and cleanly classes with several states, written in distinct codes blocks with PHP 5.4+.

  Sources   Download

MIT GPL-3.0+

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

20/07 2015

2.0.0-beta6

2.0.0.0-beta6 http://teknoo.it/states

Library to create PHP classes following the State pattern and to create easily and cleanly classes with several states, written in distinct codes blocks with PHP 7+.

  Sources   Download

MIT GPL-3.0+

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

03/07 2015

2.0.0-beta5

2.0.0.0-beta5 http://teknoo.it/states

Library to create PHP classes following the State pattern and to create easily and cleanly classes with several states, written in distinct codes blocks with PHP 7+.

  Sources   Download

MIT GPL-3.0+

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

22/06 2015

1.2.0-beta3

1.2.0.0-beta3 http://teknoo.it/states

Library to create easily and cleanly classes with several states, writed in distinct codes blocks, but never used "if conditions" with PHP 5.4+.

  Sources   Download

MIT GPL-3.0+

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

22/06 2015

2.0.0-beta4

2.0.0.0-beta4 http://teknoo.it/states

Library to create easily and cleanly classes with several states, writed in distinct codes blocks, but never used "if conditions" with PHP 5.4+.

  Sources   Download

MIT GPL-3.0+

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

10/06 2015

2.0.0-beta3

2.0.0.0-beta3 http://teknoo.it/states

Library to create easily and cleanly classes with several states, writed in distinct codes blocks, but never used "if conditions" with PHP 5.4+.

  Sources   Download

MIT GPL-3.0+

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

10/06 2015

1.2.0-beta2

1.2.0.0-beta2 http://teknoo.it/states

Library to create easily and cleanly classes with several states, writed in distinct codes blocks, but never used "if conditions" with PHP 5.4+.

  Sources   Download

MIT GPL-3.0+

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

07/06 2015

2.0.0-beta2

2.0.0.0-beta2 http://teknoo.it/states

Library to create easily and cleanly classes with several states, writed in distinct codes blocks, but never used "if conditions" with PHP 5.4+.

  Sources   Download

MIT GPL-3.0+

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

07/06 2015

1.2.0-beta1

1.2.0.0-beta1 http://teknoo.it/states

Library to create easily and cleanly classes with several states, writed in distinct codes blocks, but never used "if conditions" with PHP 5.4+.

  Sources   Download

MIT GPL-3.0+

The Requires

 

The Development Requires

by Richard DĂ©loge

pattern class states state pattern behavioral software design pattern

24/05 2015

1.1.2

1.1.2.0 http://teknoo.it/states

Library to create easily and cleanly classes with several states, writed in distinct codes blocks, but never used "if conditions" with PHP 5.4+.

  Sources   Download

MIT GPL-3.0+

The Requires

 

The Development Requires

by Richard DĂ©loge

class states

22/05 2015

1.1.1

1.1.1.0 http://teknoo.it/states

Library to create easily and cleanly classes with several states, writed in distinct codes blocks, but never used "if conditions" with PHP 5.4+.

  Sources   Download

MIT GPL-3.0+

The Requires

 

The Development Requires

by Richard DĂ©loge

class states

20/02 2015

1.1.0

1.1.0.0 http://teknoo.it/states

Library to create easily and cleanly classes with several states, writed in distinct codes blocks, but never used "if conditions" with PHP 5.4+.

  Sources   Download

MIT GPL-3.0+

The Requires

 

The Development Requires

by Richard DĂ©loge

class states

19/02 2015

1.0.3

1.0.3.0 http://teknoo.it/states

Library to create easily and cleanly classes with several states, writed in distinct codes blocks, but never used "if conditions" with PHP 5.4+.

  Sources   Download

MIT GPL-3.0+

The Requires

 

The Development Requires

by Richard DĂ©loge

class states

09/02 2015

1.0.2

1.0.2.0 http://teknoo.it/states

States is a lib to allow developers to write states for their business object with PHP 5.4+

  Sources   Download

MIT GPL-3.0+

The Requires

 

The Development Requires

by Richard DĂ©loge

class states

17/01 2015

1.0.0

1.0.0.0 http://teknoo.it/states

States is a lib to allow developers to write states for their business object with PHP 5.4+

  Sources   Download

MIT GPL-3.0+

The Requires

 

The Development Requires

by Richard DĂ©loge

class states

17/01 2015

1.0.1

1.0.1.0 http://teknoo.it/states

States is a lib to allow developers to write states for their business object with PHP 5.4+

  Sources   Download

MIT GPL-3.0+

The Requires

 

The Development Requires

by Richard DĂ©loge

class states

16/11 2014

0.9.1-RC

0.9.1.0-RC http://teknoo.it/states

States is a lib to allow developers to write states for their business object with PHP 5.4+

  Sources   Download

MIT GPL-3.0+

The Requires

 

The Development Requires

by Richard DĂ©loge

class states