Example #1
0
 /**
  * {@inheritDoc}
  */
 public function findModelByIdentificator(Identificator $identificator)
 {
     if (ltrim($identificator->getClass(), '\\') === ltrim($this->modelClass, '\\')) {
         return $this->findModelById($identificator->getId());
     }
 }
Example #2
0
 /**
  * @test
  */
 public function shouldAllowGetClassSetInConstructor()
 {
     $id = new Identificator('theId', new \stdClass());
     $this->assertEquals('stdClass', $id->getClass());
 }