/** * Counts the number of arguments or words. * * @param int $mode The counter mode. * Either COUNT_NORMAL or COUNT_RECURSIVE. * When in normal mode, counts the number of arguments. * When in recursive mode, counts the number of API words. * * @return int The number of arguments/words. */ public function count($mode = COUNT_NORMAL) { $result = parent::count($mode); if ($mode !== COUNT_NORMAL) { $result += count($this->unrecognizedWords); } return $result; }
/** * Removes all arguments from the request. * * @return $this The request object. */ public function removeAllArguments() { return parent::removeAllAttributes(); }
/** * Adds a condition. * * @param string $name The name of the property to test. * @param string|resource|null $value Value of the property as a string * or seekable stream. Not required for existence tests. * If a seekable stream is provided, it is sent from its current * posistion to its end, and the pointer is seeked back to its current * position after sending. * Non seekable streams, as well as all other types, are casted to a * string. * @param string $operator One of the ACTION_* constants. * Describes the operation to perform. * * @return $this The query object. */ protected function addWhere($name, $value, $operator) { $this->words[] = array(static::sanitizeOperator($operator) . Message::sanitizeAttributeName($name), null === $value ? null : Message::sanitizeAttributeValue($value)); return $this; }