MAKS\AmqpAgent\Worker\AbstractWorkerSingleton
An abstract decorator class implementing mapping functions (proxy functions) to turn a normal worker into a singleton.
Synopsis
- // methods
- public static AbstractWorkerSingleton getInstance()
- public mixed __get()
- public void __set()
- public mixed __call()
- public static mixed __callStatic()
- // Inherited methods from Singleton
- protected void __construct()
- public void __clone()
- public void __sleep()
- public void __wakeup()
- public static Singleton getInstance()
- public void destroyInstance()
Hierarchy
Extends
Coverage
Methods | 100% | 5 / 5 |
Lines | 100% | 34 / 34 |
Members
protected
- $class
—
string
The full qualified name of the instantiated class. - $worker
—
MAKS\AmqpAgent\Worker\AbstractWorker
The instance of the worker class (a class that extends AbstractWorker).
Methods
public
- __call() — Calls a method on a class that extend AbstractWorker and throws an exception for calls to undefined methods.
- __callStatic() — Calls a method on a class that extend AbstractWorker and throws an exception for calls to undefined static methods.
- __get() — Gets a class member via public property access notation.
- __set() — Sets a class member via public property assignment notation.
- getInstance() — Returns an instance of the class this method was called on.
Inherited from MAKS\AmqpAgent\Helper\Singleton
public
- __clone() — Cloning is not permitted for singletons.
- __sleep() — Serialization is not permitted for singletons.
- __wakeup() — Unserialization is not permitted for singletons.
- destroyInstance() — Destroys the singleton's instance it was called on.
- getInstance() — The method used to get the singleton's instance.
History
-
2021-01-12T21:10:22+00:00 (commit #ec983ca)
Author: Marwan Al-Soltany (MarwanAlsoltany@gmail.com) / Commiter: Marwan Al-Soltany (MarwanAlsoltany@gmail.com)
Update abstract worker singleton class * Fix typos
-
2021-01-12T21:10:21+00:00 (commit #d09424b)
Author: Marwan Al-Soltany (MarwanAlsoltany@gmail.com) / Commiter: Marwan Al-Soltany (MarwanAlsoltany@gmail.com)
Add strict types declaration * Add declare(strict_types=1) to all files * Fix file header DocBlock spacing of all files
-
2020-09-23T18:47:06+00:00 (commit #1a3f203)
Author: Marwan Al-Soltany (MarwanAlsoltany@gmail.com) / Commiter: Marwan Al-Soltany (MarwanAlsoltany@gmail.com)
Fix typos and update DocBlocks * Fix some typos in DockBlocks and other parts of the codebase * Add examples to classes DocBlocks
-
2020-09-13T22:04:05+00:00 (commit #a3c32c2)
Author: Marwan Al-Soltany (MarwanAlsoltany@gmail.com) / Commiter: Marwan Al-Soltany (MarwanAlsoltany@gmail.com)
Update abstract worker singleton class * Remove unnecessary use statements * Refactor __call and __callStatic methods * Update class DocBlock
-
2020-06-13T05:58:02+00:00 (commit #9b214f4)
Author: Marwan Al-Soltany (MarwanAlsoltany@gmail.com) / Commiter: Marwan Al-Soltany (MarwanAlsoltany@gmail.com)
Add workers' singleton versions * Add AbstractWorkerSingleton.php * Add ConsumerSingleton.php * Add PublisherSingleton.php