lithium\console\command\Library::_toPath PHP Method

_toPath() protected method

Take a name and return the path.
protected _toPath ( string $name = null ) : string
$name string
return string
    protected function _toPath($name = null)
    {
        if ($name && $name[0] === '/') {
            return $name;
        }
        $library = Libraries::get($name);
        if (!empty($library['path'])) {
            return $library['path'];
        }
        $path = $this->request->env('working');
        return !empty($name) ? "{$path}/{$name}" : $path;
    }