final class Factory in Zircon Profile 8
Same name in this branch
- 8 vendor/sebastian/comparator/src/Factory.php \SebastianBergmann\Comparator\Factory
- 8 vendor/phpspec/prophecy/src/Prophecy/Comparator/Factory.php \Prophecy\Comparator\Factory
Same name and namespace in other branches
- 8.0 vendor/phpspec/prophecy/src/Prophecy/Comparator/Factory.php \Prophecy\Comparator\Factory
Prophecy comparator factory.
@author Konstantin Kudryashov <ever.zet@gmail.com>
Hierarchy
Expanded class hierarchy of Factory
3 files declare their use of Factory
- ExactValueToken.php in vendor/
phpspec/ prophecy/ src/ Prophecy/ Argument/ Token/ ExactValueToken.php - ObjectProphecy.php in vendor/
phpspec/ prophecy/ src/ Prophecy/ Prophecy/ ObjectProphecy.php - ObjectStateToken.php in vendor/
phpspec/ prophecy/ src/ Prophecy/ Argument/ Token/ ObjectStateToken.php
File
- vendor/
phpspec/ prophecy/ src/ Prophecy/ Comparator/ Factory.php, line 21
Namespace
Prophecy\ComparatorView source
final class Factory extends BaseFactory {
/**
* @var Factory
*/
private static $instance;
public function __construct() {
parent::__construct();
$this
->register(new ClosureComparator());
}
/**
* @return Factory
*/
public static function getInstance() {
if (self::$instance === null) {
self::$instance = new Factory();
}
return self::$instance;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Factory:: |
private | property | ||
Factory:: |
private static | property |
Overrides Factory:: |
|
Factory:: |
public | function | Returns the correct comparator for comparing two values. | |
Factory:: |
public static | function |
Overrides Factory:: |
|
Factory:: |
public | function | Registers a new comparator. | |
Factory:: |
public | function | Unregisters a comparator. | |
Factory:: |
public | function |
Constructs a new factory. Overrides Factory:: |