/** * @param string $preparedUrl * @return null|string */ private static function buildWhere($preparedUrl) { $criteria = new Criteria(); $andList = explode('|', $preparedUrl); $andList = array_filter($andList); foreach ($andList as $condition) { $criteria->andWhere(self::buildOR($condition)); } return $criteria->getWhere(); }