Use getter or setter
Retained for backward compatibility
@param null $path
@return $this
@deprecated
325652
public function path($path = NULL) {
        if (isset($path)) {
            $this->setPath($path);
            return $this;
        }
        return $this->getPath();
    }
1001141
public function setPath($path = null) : bool
    {
        if ($path === null) {
            $uri = $this->server->get('REQUEST_URI');

            if (!empty($uri)) {
                $uriParts = explode('?', $uri);
                $this->path = $uriParts[0];

                return true;
            }

            // Default to a slash
            $this->path = '/';

            return true;
        }

        $this->path = $path;

        return true;
    }
597526
public function set($path, $value)
    {
        $this->callAtPath($path, function(&$offset) use ($value) {
            $offset = $value;
        }, true);

        return $this;
    }
1361918
public function dbPath($path = null)
    {
        if (null === $path) {
            return $this->dbPath;
        }
        $this->dbPath = $path;

        return $this;
    }
342349
public function setPath($path)
    {
        if ($path) {
            $this->not_cleared_path = $path;
            $this->doClearPath();
        } else {
            $this->path = '';
        }

        return $this;
    }
32586
public function setPath($path = null)
    {
        if (is_string($path)) {
            if ($path{0} !== '/') {
                $path = "/$path";
            }
        }
        else if (!is_null($path)) {
            throw new \InvalidArgumentException(
                "invalid value provided for 'path'; ".
                " expecting a string or null"
            );
        }
        $this->path = $path;
    }
952035
public function setRouteEndpoint($path)
    {
        $endpoint = $this->translator()->translation($path);

        foreach ($this->translator()->availableLocales() as $lang) {
            $endpoint[$lang] = trim($endpoint[$lang], '/');
        }

        $this->routeEndpoint = $endpoint;

        return $this;
    }
669355
public function layoutPath($path = null)
    {
        deprecationWarning(
            'View::layoutPath() is deprecated. ' .
            'Use getLayoutPath()/setLayoutPath() instead.'
        );

        if ($path === null) {
            return $this->layoutPath;
        }

        $this->layoutPath = $path;
    }
859811
public function setPath($path)
    {
        static $pathReplace = array(' ' => '%20', '?' => '%3F');
        if (is_array($path)) {
            $path = '/' . implode('/', $path);
        }

        $this->path = strtr($path, $pathReplace);

        return $this;
    }
1091302
public function setPath( $path )
    {
        // Validate $path, it cant be null and must exist
        if ( ! is_string( $path ) ){ throw new InvalidPathException( 'Path must be of type string' ); }
        if ( is_null( $path ) ){ throw new InvalidPathException( 'Path can not be null' ); }
        if ( ! file_exists( $path )){ throw new InvalidPathException( '('. $path .') is invalid' ); }

        $this->path = $path;
    }
144394
private function setPath($path)
    {
        $this->path =  preg_replace_callback(
            '/(?:[^' . self::$charList . ':@\/%]+|%(?![A-Fa-f0-9]{2}))/',
            [$this, 'encode'],
            $path
        );

        return $this;
    }
267000
public function isNull($path)
    {
        $value = $this->get($path, $this);

        return $value === $this ? false : is_null($value);
    }
619538
function setPath($path = null)
    {
        if ($path === null)
            $path = array();

        // the associate array is useless
        $this->_pathSequence = array_values( (array) $path);
        return $this;
    }
1105688
public function setSource($src, $path = null)
    {
        $this->_prepared = false;
        $this->_functionName = null;
        $this->_codeFile = null;
        $this->_source = new PHPTAL_StringSource($src, $path);
        $this->_path = $this->_source->getRealPath();
        $this->_context->_docType = null;
        $this->_context->_xmlDeclaration = null;
        return $this;
    }
184914
public function templatePath($path = null)
    {
        deprecationWarning(
            'View::templatePath() is deprecated. ' .
            'Use getTemplatePath()/setTemplatePath() instead.'
        );

        if ($path === null) {
            return $this->templatePath;
        }

        $this->templatePath = $path;
    }
438966
public function requireDirectory($path = null)
    {
        if ( ! is_null($path))
        {
            return $this->directory($path)->requireDirectory();
        }

        if ($iterator = $this->iterateDirectory($this->path))
        {
            return $this->processRequire($iterator);
        }

        return $this;
    }
1200729
public function setPath($path)
    {
        static $search  = [' ',   '?'];
        static $replace = ['%20', '%3F'];
        $this->path = str_replace($search, $replace, $path);

        return $this;
    }