Nextras\Orm\Model\Model::getRepositoryForEntity PHP Method

getRepositoryForEntity() public method

public getRepositoryForEntity ( $entity )
    public function getRepositoryForEntity($entity)
    {
        $entityClassName = is_string($entity) ? $entity : get_class($entity);
        if (!isset($this->configuration[2][$entityClassName])) {
            throw new InvalidArgumentException("Repository for '{$entityClassName}' entity does not exist.");
        }
        return $this->getRepository($this->configuration[2][$entityClassName]);
    }