Exemple #1
0
 /**
  * @param TypeFactory $factory
  * @param \ReflectionMethod $method
  */
 public function __construct(TypeFactory $factory, \ReflectionMethod $method)
 {
     $start = substr($method->getName(), 0, 2) == 'is' ? 2 : 3;
     parent::__construct($factory, $method->getDeclaringClass(), lcfirst(substr($method->getName(), $start)));
     if (substr($method->getName(), 0, 3) == 'set') {
         $this->setter = $method;
     } else {
         $this->getter = $method;
     }
 }
 /**
  * @param TypeFactory $factory
  * @param \ReflectionMethod $constructor
  * @param \ReflectionParameter $parameter
  */
 public function __construct(TypeFactory $factory, \ReflectionMethod $constructor, \ReflectionParameter $parameter)
 {
     parent::__construct($factory, $constructor->getDeclaringClass(), $parameter->getName());
     $this->constructor = $constructor;
     $this->parameter = $parameter;
 }
 /**
  * @param TypeFactory $factory
  * @param \ReflectionProperty $property
  */
 public function __construct(TypeFactory $factory, \ReflectionProperty $property)
 {
     parent::__construct($factory, $property->getDeclaringClass(), $property->getName());
     $property->setAccessible(true);
     $this->property = $property;
 }
Exemple #4
0
 public function __construct(TypeFactory $factory, BaseProperty $base)
 {
     parent::__construct($factory, $base->class, $base->name());
 }