autoframe / design-patterns
PHP design patterns. Singleton...
1.0.2
2024-04-04 13:11 UTC
Requires
- php: >=7.4
- autoframe/components-exception: >=1.0
Requires (Dev)
- phpunit/phpunit: ^9.6 || ^10
- symfony/var-dumper: v5.4.24 || v6.2.11
README
PHP design patterns
Singleton
- Namespace Autoframe\DesignPatterns\Singleton
- abstract class AfrSingletonAbstractClass
- implements AfrSingletonInterface
- AfrSingletonTrait provides interface implementation
- Methods:
- final public getInstance: self
- public hasInstance: bool
- final protected __construct: self
- final public __wakeup: @throws AfrException
- final public __clone: @throws AfrException
- abstract class AfrSingletonAbstractClass
Array Access Singleton object instance
- Namespace Autoframe\DesignPatterns\SingletonArray
- abstract class AfrSingletonArrAbstractClass
- implements AfrSingletonInterface, ArrayAccess, Iterator, Countable
- use AfrObjectArrayAccessTrait
- abstract class AfrSingletonArrAbstractClass
Array Access object instance
- Namespace Autoframe\DesignPatterns\ArrayAccess
-
class AfrObjectArrayAccessClass
- implements ArrayAccess, Iterator, Countable
-
AfrObjectArrayAccessTrait implements ArrayAccess, Iterator, Countable
-