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