当前位置: 首页>>代码示例>>PHP>>正文


PHP FileManager::__construct方法代码示例

本文整理汇总了PHP中FileManager::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP FileManager::__construct方法的具体用法?PHP FileManager::__construct怎么用?PHP FileManager::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FileManager的用法示例。


在下文中一共展示了FileManager::__construct方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct($options)
 {
     $this->scandir_alias_lu_arr = null;
     $options = array_merge(array('Aliases' => null), is_array($options) ? $options : array());
     parent::__construct($options);
     /*
      * Now process the Aliases array:
      * it works as-is for transforming URI to FILE path, but we need
      * to munch the list for scandir() to have fast access at the same info:
      *
      * here the goal is for scandir() to show the aliases as (fake) directory
      * entries, hence we need to collect the aliases per parent directory:
      */
     if (is_array($this->options['Aliases'])) {
         $alias_arr = $this->options['Aliases'];
         // collect the set of aliases per parent directory: we need a fully set up options['URLpath4FileManagedDirTree'] for this now
         $scandir_lookup_arr = array();
         // NOTE: we can use any of the url2file_path methods here as those only use the raw [Aliases] array
         foreach ($alias_arr as $uri => $file) {
             $isdir = !is_file($file);
             $p_uri = parent::getParentDir($uri);
             $a_name = basename($uri);
             // as scandir works with filesystem paths, convert this URI path to a filesystem path:
             $p_dir = $this->url_path2file_path($p_uri);
             $p_dir = self::enforceTrailingSlash($p_dir);
             if (!isset($scandir_lookup_arr[$p_dir])) {
                 $scandir_lookup_arr[$p_dir] = array(array(), array());
             }
             $scandir_lookup_arr[$p_dir][!$isdir][] = $a_name;
         }
         $this->scandir_alias_lu_arr = $scandir_lookup_arr;
     }
 }
开发者ID:nbourguig,项目名称:ionize,代码行数:33,代码来源:Filemanagerwithaliassupport.php

示例2: assert

 /**
  * Constructor.
  * Create a manager for handling issue files.
  * @param $issueId int
  */
 function __construct($issueId)
 {
     $issueDao = DAORegistry::getDAO('IssueDAO');
     $issue = $issueDao->getById($issueId);
     assert(isset($issue));
     $this->setIssueId($issueId);
     $this->setFilesDir(Config::getVar('files', 'files_dir') . '/journals/' . $issue->getJournalId() . '/issues/' . $issueId . '/');
     parent::__construct();
 }
开发者ID:pkp,项目名称:ojs,代码行数:14,代码来源:IssueFileManager.inc.php

示例3: __construct

 /**
  * Builds a new UploadManager storing files in the directory $dir, and
  * using the prefix $prefix for filenames.
  * @param string $dir
  * @param string $prefix
  */
 public function __construct($dir, $prefix)
 {
     parent::__construct($dir, $prefix, true, false);
 }
开发者ID:benapetr,项目名称:KeePassPHP,代码行数:10,代码来源:uploadmanager.php

示例4:

 /**
  * Constructor
  */
 function __construct()
 {
     parent::__construct();
     $this->filesDir = $this->getBasePath();
 }
开发者ID:PublishingWithoutWalls,项目名称:pkp-lib,代码行数:8,代码来源:PrivateFileManager.inc.php

示例5: __construct

 /**
  * Constructor
  */
 public function __construct()
 {
     parent::__construct();
 }
开发者ID:REZ1DENT3,项目名称:Kinopoisk2IMDB,代码行数:7,代码来源:ResourceManager.php


注:本文中的FileManager::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。