/** * @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; }
/** * @param string|\DataEntity\TypeInterface $type * * @return \DataEntity\TypeInterface */ protected function getType($type) { return Echidna::type($type); }