public function addArgument($arg, $unique = false)
    {
        if (!is_scalar($arg)) {
            throw new InvalidArgumentException('scalar', 0);
        }

        // escape arguments with spaces
        if (strpos($arg, ' ') !== false && (strpos($arg, '"') === false) ) {
            $arg = "\"$arg\"";
        }

        if (in_array($arg, $this->arguments) && $unique) {
            return $this;
        }

        $this->arguments[] = $arg;

        return $this;
    }
public function addArgument($arg, $unique = false)
    {
        if (!is_scalar($arg)) {
            throw new InvalidArgumentException('scalar', 0);
        }

        // escape arguments with spaces
        if (strpos($arg, ' ') !== false && (strpos($arg, '"') === false) ) {
            $arg = "\"$arg\"";
        }

        if (in_array($arg, $this->arguments) && $unique) {
            return $this;
        }

        $this->arguments[] = $arg;

        return $this;
    }
public function addArgument ( $ arg , $ unique = false ) { if ( ! is_scalar ( $ arg ) ) { throw new InvalidArgumentException ( 'scalar' , 0 ) ; } // escape arguments with spaces if ( strpos ( $ arg , ' ' ) !== false && ( strpos ( $ arg , '"' ) === false ) ) { $ arg = "\"$arg\"" ; } if ( in_array ( $ arg , $ this -> arguments ) && $ unique ) { return $ this ; } $ this -> arguments [ ] = $ arg ; return $ this ; }
Add an argument to the Directive arguments array

@param mixed $arg [required] A scalar
@param bool $unique [optional] If this argument is unique
@return $this
@throws InvalidArgumentException
Add an argument to the Directive arguments array