Phrozn/Runner/CommandLine/Callback/Base.php
protected function getPathArgument($name, $realpath = true, $command = null)
    {
        if (null == $command) {
            $command = $this->getParseResult()->command;
        }
        $path = isset($command->args[$name]) ? $command->args[$name] : \getcwd();

        if (!$this->isAbsolute($path)) { // not an absolute path
            $path = \getcwd() . '/./' . $path;
        }

        if ($realpath) {
            $path = realpath($path);
        }

        return $path;
    }
protected function getPathArgument($name, $realpath = true, $command = null)
    {
        if (null == $command) {
            $command = $this->getParseResult()->command;
        }
        $path = isset($command->args[$name]) ? $command->args[$name] : \getcwd();

        if (!$this->isAbsolute($path)) { // not an absolute path
            $path = \getcwd() . '/./' . $path;
        }

        if ($realpath) {
            $path = realpath($path);
        }

        return $path;
    }
protected function getPathArgument ( $ name , $ realpath = true , $ command = null ) { if ( null == $ command ) { $ command = $ this -> getParseResult ( ) -> command ; } $ path = isset ( $ command -> args [ $ name ] ) ? $ command -> args [ $ name ] : \ getcwd ( ) ; if ( ! $ this -> isAbsolute ( $ path ) ) { // not an absolute path $ path = \ getcwd ( ) . '/./' . $ path ; } if ( $ realpath ) { $ path = realpath ( $ path ) ; } return $ path ; }
Extract path argument or fallback to cwd

@param string $name Name of the path argument
@param boolean $realpath Whether to apply realpath() to path
@param \Console_CommandLine_Result $command Command line result to use

@return string
Extract path argument or fallback to cwd