public static function escape($value, $ignore = '', $flags = 0) { if (!static::isEscapingSupported()) { return static::escapeManual($value, $ignore, $flags); } return ldap_escape($value, $ignore, $flags); }
/** * Constructor. * * @param string $field * @param string $operator * @param string $value * * @throws InvalidQueryOperatorException */ public function __construct($field, $operator, $value) { // We'll escape the field to avoid allowing unsafe characters inside. $this->field = Utilities::escape($field, null, 3); // Validate and retrieve the operator. $this->operator = $this->validateOperator($operator); // Completely escape the value. $this->value = Utilities::escape($value); }