Beispiel #1
0
 function getFolders()
 {
     $folders = new RecursiveIteratorIterator($this->mail->getFolders(), RecursiveIteratorIterator::SELF_FIRST);
     $ary = array();
     foreach ($folders as $local => $folder) {
         $ary[htmlspecialchars($local)] = htmlspecialchars($folder);
     }
     return $ary;
 }
Beispiel #2
0
 /**
  * check for a theme asset
  *
  * @param   string          Theme to load
  * @param   string          Path to the asset
  * @return  string|bool     url path to asset or bool false
  */
 public function findThemeAsset($theme, $asset)
 {
     if (!empty($theme)) {
         $Folders = $this->engine->getFolders();
         if ($Folders->exists($theme)) {
             $this->Folder = $Folders->get($theme);
             $folderPath = rtrim($this->Folder->getPath(), '/');
             $folderPath = $this->removeViewFromPath($folderPath);
             if (file_exists($folderPath . DS . $asset)) {
                 $this->createSymlink($folderPath);
                 return '/' . $this->assetDir . '/' . $this->asset['asset'];
             }
         }
     }
     return false;
 }