MAKS\AmqpAgent\Worker\ConsumerSingleton
A singleton version of the Consumer class.
Static and constant properties are accessed via object operator (`->` not `::`).
Example:
```
$consumer = ConsumerSingleton::getInstance();
```
Synopsis
- // Inherited members from AbstractWorkerSingleton
- protected static $class;
- protected AbstractWorker $worker;
- // methods
- public void __construct()
- // Inherited methods from AbstractWorkerSingleton
- 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
Coverage
Methods | 100% | 1 / 1 |
Lines | 100% | 2 / 2 |
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
Inherited from MAKS\AmqpAgent\Worker\AbstractWorkerSingleton
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-08-28T07:41:35+00:00 (commit #e0e61e2)
Author: Marwan Al-Soltany (MarwanAlsoltany@gmail.com) / Commiter: Marwan Al-Soltany (MarwanAlsoltany@gmail.com)
Update consumer singleton class * Update class DocBlock
-
2021-01-12T21:10:22+00:00 (commit #81ab219)
Author: Marwan Al-Soltany (MarwanAlsoltany@gmail.com) / Commiter: Marwan Al-Soltany (MarwanAlsoltany@gmail.com)
Update consumer singleton class * Add used classes in DocBlocks
-
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:03:14+00:00 (commit #936f31a)
Author: Marwan Al-Soltany (MarwanAlsoltany@gmail.com) / Commiter: Marwan Al-Soltany (MarwanAlsoltany@gmail.com)
Update abstract worker class * Change arguments method to a static method * Update method signature corresponding interface * Update method references on workers singleton classes (DocBlocks)
-
2020-08-09T22:14:52+00:00 (commit #1df82db)
Author: Marwan Al-Soltany (MarwanAlsoltany@gmail.com) / Commiter: Marwan Al-Soltany (MarwanAlsoltany@gmail.com)
Update * Update DocBlocks of classes that reference methods on the AbstarctWorker class.
-
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