private final function ensureCriterionHasProperId($criterion) { $collection_name = $this->collectionName; Kit::ensureArray($criterion); if (TRUE === isset($criterion['_id']) and (TRUE === Kit::isArray($criterion['_id']) and FALSE === Kit::isArray($criterion['_id']['$in']) or FALSE === Kit::isArray($criterion['_id']) and FALSE === $criterion['_id'] instanceof MongoId)) { throw new UserException("<{$collection_name}>\$criterion has improper _id.", $criterion); } }
protected final function process($name = NULL, $value = Kit::TYPE_VACANCY, $is_list = FALSE) { if (FALSE === Kit::isVacancy($value) and FALSE === Kit::isArray($value)) { throw new UserException('$value of process should be a dict.', [$name, $value, $is_list]); } $this->hasCalledCoreModel = TRUE; if (FALSE === Kit::isVacancy($value) and (FALSE === isset($value[BaseCore::S_OK]) or TRUE !== $value[BaseCore::S_OK])) { $this->fail(); } $isProcessed = TRUE; return $this->handleResult('process', $name, $value, $is_list); }