コード例 #1
0
ファイル: Mapper.php プロジェクト: yrizos/echidna
 /**
  * @param array $query
  */
 public function findOne(array $query = [])
 {
     $result = $this->getCollection()->findOne($query);
     return $result ? Echidna::document($this->getDocument(), $result, false, $this, ['after_get']) : null;
 }
コード例 #2
0
ファイル: Document.php プロジェクト: yrizos/echidna
 /**
  * @param string|\DataEntity\TypeInterface $type
  *
  * @return \DataEntity\TypeInterface
  */
 protected function getType($type)
 {
     return Echidna::type($type);
 }