PhpSpec\Wrapper\Subject\WrappedObject::getFactoryMethod PHP 메소드

getFactoryMethod() 공개 메소드

public getFactoryMethod ( ) : callable | null
리턴 callable | null
    public function getFactoryMethod()
    {
        return $this->factoryMethod;
    }

Usage Example

예제 #1
0
 /**
  * @return mixed
  */
 public function duringInstantiation()
 {
     if ($factoryMethod = $this->wrappedObject->getFactoryMethod()) {
         $method = is_array($factoryMethod) ? $factoryMethod[1] : $factoryMethod;
     } else {
         $method = '__construct';
     }
     $instantiator = new Instantiator();
     $object = $instantiator->instantiate($this->wrappedObject->getClassName());
     return $this->runDuring($object, $method, $this->wrappedObject->getArguments());
 }
All Usage Examples Of PhpSpec\Wrapper\Subject\WrappedObject::getFactoryMethod