S3Browser::getParent PHP Method

getParent() public static method

Returns parent directory
public static getParent ( string $path = '/' ) : array
$path string
return array
    public static function getParent($path = '/')
    {
        $crumbs = self::getBreadcrumb($path);
        $current = array_pop($crumbs);
        $parent = array_pop($crumbs);
        return $parent;
    }

Usage Example

Esempio n. 1
0
    ?>
      <p>No files found.</p>
    <?php 
} else {
    ?>
    <ul>

    <?php 
    if (S3Browser::getParent($dir) !== null) {
        ?>
      <li>
        <a href="<?php 
        echo $config['base-path'];
        ?>
/<?php 
        echo S3Browser::getParent($dir);
        ?>
">
          <img src="<?php 
        echo $config['base-path'];
        ?>
/themes/plain/img/arrow_top.gif">
          <span>..</span>
        </a>
      </li>
    <?php 
    }
    ?>
    <?php 
    foreach ($files as $key => $info) {
        ?>