getMetadataStorage() public method

Returns entity metadata storage.
public getMetadataStorage ( ) : MetadataStorage
return MetadataStorage
コード例 #1
0
ファイル: Repository.php プロジェクト: Zarganwar/orm
 public function onModelAttach(IModel $model)
 {
     if ($this->model && $this->model !== $model) {
         throw new InvalidStateException('Repository is already attached.');
     }
     $this->model = $model;
     $this->metadataStorage = $model->getMetadataStorage();
 }
コード例 #2
0
 public function __construct(IModel $model, IMapper $mapper)
 {
     $this->model = $model;
     $this->mapper = $mapper;
     $this->metadataStorage = $model->getMetadataStorage();
 }