autoframe/design-patterns

PHP design patterns. Singleton...

1.0.2 2024-04-04 13:11 UTC

This package is auto-updated.

Last update: 2024-12-04 14:41:27 UTC


README

Build Status License: MIT Packagist Version Downloads

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

Array Access Singleton object instance

  • Namespace Autoframe\DesignPatterns\SingletonArray
    • abstract class AfrSingletonArrAbstractClass
      • implements AfrSingletonInterface, ArrayAccess, Iterator, Countable
      • use AfrObjectArrayAccessTrait

Array Access object instance

  • Namespace Autoframe\DesignPatterns\ArrayAccess
    • class AfrObjectArrayAccessClass

      • implements ArrayAccess, Iterator, Countable
    • AfrObjectArrayAccessTrait implements ArrayAccess, Iterator, Countable