コード例 #1
0
ファイル: AuthenticateApi.php プロジェクト: xeeo/php-services
 private function getUserByIdentifier()
 {
     $mapper = $this->getMapper();
     if (empty($this->constraints)) {
         $user = $mapper::findOne(Filter::set($this->getIdentifierField(), Filter::EQUAL, $this->getIdentifierValue()));
     } else {
         $user = $mapper::findOne(Group::set(Filter::set($this->getIdentifierField(), Filter::EQUAL, $this->getIdentifierValue()), Group::OPERATOR_AND, $this->constraints));
     }
     return $user;
 }
コード例 #2
0
ファイル: Mapper.php プロジェクト: xeeo/php-services
 public static function getGroup(FilterInterface $firstCondition, $operator, FilterInterface $secondCondition)
 {
     return Group::set($firstCondition, $operator, $secondCondition);
 }