create() public static method

public static create ( string $id, string $className ) : ObjectNotFoundException
$id string
$className string
return ObjectNotFoundException
Example #1
0
 /**
  * @param FixtureIdInterface $fixture
  *
  * @throws ObjectNotFoundException
  * 
  * @return ObjectInterface
  */
 public function get(FixtureIdInterface $fixture) : ObjectInterface
 {
     if ($this->has($fixture)) {
         return $this->objects[$fixture->getId()];
     }
     throw ObjectNotFoundExceptionFactory::create($fixture->getId(), $fixture instanceof FixtureInterface ? $fixture->getClassName() : 'no class given');
 }