autoframe/设计模式

PHP 设计模式。单例...

1.0.2 2024-04-04 13:11 UTC

This package is auto-updated.

Last update: 2024-09-04 14:14:04 UTC


README

Build Status License: MIT Packagist Version Downloads

PHP 设计模式

单例

  • 命名空间 Autoframe\DesignPatterns\Singleton
    • 抽象类 AfrSingletonAbstractClass
      • 实现 AfrSingletonInterface
    • AfrSingletonTrait 提供接口实现
    • 方法
      • final public getInstance: self
      • public hasInstance: bool
      • final protected __construct: self
      • final public __wakeup: @throws AfrException
      • final public __clone: @throws AfrException

数组访问单例对象实例

  • 命名空间 Autoframe\DesignPatterns\SingletonArray
    • 抽象类 AfrSingletonArrAbstractClass
      • 实现 AfrSingletonInterface, ArrayAccess, Iterator, Countable
      • use AfrObjectArrayAccessTrait

数组访问对象实例

  • 命名空间 Autoframe\DesignPatterns\ArrayAccess
    • 类 AfrObjectArrayAccessClass

      • 实现 ArrayAccess, Iterator, Countable
    • AfrObjectArrayAccessTrait 实现 ArrayAccess, Iterator, Countable