for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php declare(strict_types = 1);
/**
* Created by PhpStorm.
* User: root
* Date: 27.07.2016
* Time: 1:55.
*/
namespace samsonframework\containercollection\attribute;
use samsonframework\container\configurator\ClassConfiguratorInterface;
use samsonframework\container\configurator\ParameterConfiguratorInterface;
use samsonframework\container\configurator\PropertyConfiguratorInterface;
use samsonframework\container\metadata\ClassMetadata;
use samsonframework\container\metadata\ParameterMetadata;
use samsonframework\container\metadata\PropertyMetadata;
* Class name attribute configurator class.
*
* @see \samsonframework\container\configurator\ScopeConfigurator
* @author Vitaly Egorov <[email protected]>
class ClassName implements ClassConfiguratorInterface, PropertyConfiguratorInterface, ParameterConfiguratorInterface, AttributeConfiguratorInterface
{
/** @var string Configurator key */
const KEY = 'class';
* @var string Dependency class name
protected $className;
* Class collection configurator constructor.
* @param string $className Class name
public function __construct(string $className)
$this->className = $className;
}
/* {@inheritDoc} */
public function toClassMetadata(ClassMetadata $classMetadata)
$classMetadata->className = $this->className;
public function toPropertyMetadata(PropertyMetadata $propertyMetadata)
$propertyMetadata->dependency = $this->className;
public function toParameterMetadata(ParameterMetadata $parameterMetadata)
$parameterMetadata->dependency = $this->className;