예제 #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);
 }