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; }
public static function getGroup(FilterInterface $firstCondition, $operator, FilterInterface $secondCondition) { return Group::set($firstCondition, $operator, $secondCondition); }