Bolt\Storage\EntityManagerInterface::getRepository PHP Method

getRepository() public method

Gets the repository for a class.
public getRepository ( string $className ) : Repository
$className string
return Repository
    public function getRepository($className);

Usage Example

 public function getMissingRecords()
 {
     $missing = [];
     foreach ($this->records as $record) {
         $repo = $this->storage->getRepository($record->getContentType());
         $fields = $this->getRequiredFieldsArrayFromRecord($record);
         if (count($fields)) {
             $results = $repo->findBy($fields);
             if (!$results) {
                 $missing[] = $record;
             }
         }
     }
     return $missing;
 }
All Usage Examples Of Bolt\Storage\EntityManagerInterface::getRepository
EntityManagerInterface