Horde_Vfs_Base::_getPath PHP Метод

_getPath() защищенный Метод

Returns the full path of an item.
protected _getPath ( string $path, string $name ) : mixed
$path string The path of directory of the item.
$name string The name of the item.
Результат mixed Full path when $path isset and just $name when not set.
    protected function _getPath($path, $name)
    {
        if (strlen($path) > 0) {
            if (substr($path, -1) == '/') {
                return $path . $name;
            }
            return $path . '/' . $name;
        }
        return $name;
    }

Usage Example

Пример #1
0
 /**
  * Returns the full path of an item.
  *
  * @param string $path  The directory of the item.
  * @param string $name  The name of the item.
  *
  * @return mixed  Full path to the file when $path is not empty and just
  *                $name when not set.
  */
 protected function _getPath($path, $name)
 {
     if (isset($this->_params['vfsroot']) && strlen($this->_params['vfsroot'])) {
         if (strlen($path)) {
             $path = $this->_params['vfsroot'] . '/' . $path;
         } else {
             $path = $this->_params['vfsroot'];
         }
     }
     return parent::_getPath($path, $name);
 }