當前位置: 首頁>>代碼示例>>PHP>>正文


PHP elFinderVolumeDriver::configure方法代碼示例

本文整理匯總了PHP中elFinderVolumeDriver::configure方法的典型用法代碼示例。如果您正苦於以下問題:PHP elFinderVolumeDriver::configure方法的具體用法?PHP elFinderVolumeDriver::configure怎麽用?PHP elFinderVolumeDriver::configure使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在elFinderVolumeDriver的用法示例。


在下文中一共展示了elFinderVolumeDriver::configure方法的14個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: configure

 /**
  * Configure after successfull mount.
  *
  * @return void
  * @author Dmitry (dio) Levashov
  **/
 protected function configure()
 {
     $this->aroot = realpath($this->root);
     $root = $this->stat($this->root);
     if ($this->options['quarantine']) {
         $this->attributes[] = array('pattern' => '~^' . preg_quote(DIRECTORY_SEPARATOR . $this->options['quarantine']) . '$~', 'read' => false, 'write' => false, 'locked' => true, 'hidden' => true);
     }
     // chek thumbnails path
     if ($this->options['tmbPath']) {
         $this->options['tmbPath'] = strpos($this->options['tmbPath'], DIRECTORY_SEPARATOR) === false ? $this->root . DIRECTORY_SEPARATOR . $this->options['tmbPath'] : $this->_normpath($this->options['tmbPath']);
     }
     parent::configure();
     // if no thumbnails url - try detect it
     if ($root['read'] && !$this->tmbURL && $this->URL) {
         if (strpos($this->tmbPath, $this->root) === 0) {
             $this->tmbURL = $this->URL . str_replace(DIRECTORY_SEPARATOR, '/', substr($this->tmbPath, strlen($this->root) + 1));
             if (preg_match("|[^/?&=]\$|", $this->tmbURL)) {
                 $this->tmbURL .= '/';
             }
         }
     }
     // check quarantine dir
     if (!empty($this->options['quarantine'])) {
         $this->quarantine = $this->root . DIRECTORY_SEPARATOR . $this->options['quarantine'];
         if (!is_dir($this->quarantine) && !$this->_mkdir($this->root, $this->options['quarantine']) || !is_writable($this->quarantine)) {
             $this->archivers['extract'] = array();
             $this->disabled[] = 'extract';
         }
     } else {
         $this->archivers['extract'] = array();
         $this->disabled[] = 'extract';
     }
 }
開發者ID:rb26,項目名稱:zenphoto,代碼行數:39,代碼來源:elFinderVolumeLocalFileSystem.class.php

示例2: configure

 protected function configure()
 {
     parent::configure();
     if (!empty($this->options['tmpPath'])) {
         if ((is_dir($this->options['tmpPath']) || @mkdir($this->options['tmpPath'])) && is_writable($this->options['tmpPath'])) {
             $this->tmpPath = $this->options['tmpPath'];
         }
     }
     $this->mimeDetect = 'internal';
 }
開發者ID:DrudgeRajen,項目名稱:laravel-media-manager,代碼行數:10,代碼來源:elFinderVolumeS3.class.php

示例3: configure

 protected function configure()
 {
     parent::configure();
     $this->tmpPath = '';
     if (!empty($this->options['tmpPath'])) {
         if ((is_dir($this->options['tmpPath']) || @mkdir($this->options['tmpPath'])) && is_writable($this->options['tmpPath'])) {
             $this->tmpPath = $this->options['tmpPath'];
         }
     }
     if (!$this->tmpPath && ($tmp = elFinder::getStaticVar('commonTempPath'))) {
         $this->tmpPath = $tmp;
     }
     $this->mimeDetect = 'internal';
 }
開發者ID:vkirpa,項目名稱:elFinder,代碼行數:14,代碼來源:elFinderVolumeS3.class.php

示例4: configure

 protected function configure()
 {
     if ($this->options['tmbPath']) {
         $this->options['tmbPath'] = strpos($this->options['tmbPath'], DIRECTORY_SEPARATOR) === false ? $this->root . DIRECTORY_SEPARATOR . $this->options['tmbPath'] : $this->_normpath($this->options['tmbPath']);
     }
     parent::configure();
     if ($this->attr($this->root, 'read') && !$this->tmbURL && $this->URL) {
         if (strpos($this->tmbPath, $this->root) === 0) {
             $this->tmbURL = $this->URL . str_replace(DIRECTORY_SEPARATOR, '/', substr($this->tmbPath, strlen($this->root) + 1));
             if (preg_match("|[^/?&=]\$|", $this->tmbURL)) {
                 $this->tmbURL .= '/';
             }
         }
     }
     $this->aroot = realpath($this->root);
 }
開發者ID:BGCX261,項目名稱:zimmerli-svn-to-git,代碼行數:16,代碼來源:elFinderVolumeLocalFileSystem.class.php

示例5: configure

 /**
  * Set tmp path
  *
  * @return void
  * @author Dmitry (dio) Levashov
  **/
 protected function configure()
 {
     parent::configure();
     if ($tmp = $this->options['tmpPath']) {
         if (!file_exists($tmp)) {
             if (@mkdir($tmp)) {
                 @chmod($tmp, $this->options['tmbPathMode']);
             }
         }
         $this->tmpPath = is_dir($tmp) && is_writable($tmp) ? $tmp : false;
     }
     if (!$this->tmpPath && $this->tmbPath && $this->tmbPathWritable) {
         $this->tmpPath = $this->tmbPath;
     }
     $this->mimeDetect = 'internal';
 }
開發者ID:ameoba32,項目名稱:tiki,代碼行數:22,代碼來源:elFinderVolumeTikiFiles.class.php

示例6: configure

 protected function configure()
 {
     parent::configure();
     $vfa816edb83e95bf0c8da580bdfd491ef = $this->options['tmpPath'];
     if ($vfa816edb83e95bf0c8da580bdfd491ef) {
         if (!file_exists($vfa816edb83e95bf0c8da580bdfd491ef)) {
             if (@mkdir($vfa816edb83e95bf0c8da580bdfd491ef)) {
                 @chmod($vfa816edb83e95bf0c8da580bdfd491ef, $this->options['tmbPathMode']);
             }
         }
         $this->tmpPath = is_dir($vfa816edb83e95bf0c8da580bdfd491ef) && is_writable($vfa816edb83e95bf0c8da580bdfd491ef);
     }
     if (!$this->tmpPath && $this->tmbPath && $this->tmbPathWritable) {
         $this->tmpPath = $this->tmbPath;
     }
     if (!$this->tmpPath) {
     }
 }
開發者ID:BGCX261,項目名稱:zimmerli-svn-to-git,代碼行數:18,代碼來源:elFinderVolumeMySQL.class.php

示例7: configure

 /**
  * Configure after successfull mount.
  *
  * @return void
  * @author Dmitry (dio) Levashov
  **/
 protected function configure()
 {
     $this->aroot = realpath($this->root);
     $root = $this->stat($this->root);
     if ($this->options['quarantine']) {
         $this->attributes[] = array('pattern' => '~^' . preg_quote(DIRECTORY_SEPARATOR . $this->options['quarantine']) . '$~', 'read' => false, 'write' => false, 'locked' => true, 'hidden' => true);
     }
     parent::configure();
     // check quarantine dir
     if (!empty($this->options['quarantine'])) {
         $this->quarantine = $this->root . DIRECTORY_SEPARATOR . $this->options['quarantine'];
         if (!is_dir($this->quarantine) && !$this->_mkdir($this->root, $this->options['quarantine']) || !is_writable($this->quarantine)) {
             $this->archivers['extract'] = array();
             $this->disabled[] = 'extract';
         }
     } else {
         $this->archivers['extract'] = array();
         $this->disabled[] = 'extract';
     }
 }
開發者ID:rizub4u,項目名稱:gpEasy-CMS,代碼行數:26,代碼來源:elFinderVolumeLocalFileSystem.class.php

示例8: configure

 /**
 * Configure after successfull mount.
 *
 * @return void
 * @author Dmitry (dio) Levashov
 **/
 protected function configure()
 {
     parent::configure();
     if (!$this->tmp) {
         $this->disabled[] = 'archive';
         $this->disabled[] = 'extract';
     }
 }
開發者ID:basdog22,項目名稱:Qool,代碼行數:14,代碼來源:elFinderVolumeDropbox.class.php

示例9: configure

 /**
  * Configure after successfull mount.
  *
  * @return void
  * @author Dmitry (dio) Levashov
  **/
 protected function configure()
 {
     parent::configure();
     if (!empty($this->options['tmpPath'])) {
         if ((is_dir($this->options['tmpPath']) || @mkdir($this->options['tmpPath'], 0755, true)) && is_writable($this->options['tmpPath'])) {
             $this->tmp = $this->options['tmpPath'];
         }
     }
     if (!$this->tmp && ($tmp = elFinder::getStaticVar('commonTempPath'))) {
         $this->tmp = $tmp;
     }
     if (!$this->tmp && $this->tmbPath) {
         $this->tmp = $this->tmbPath;
     }
     if (!$this->tmp) {
         $this->disabled[] = 'mkfile';
         $this->disabled[] = 'paste';
         $this->disabled[] = 'duplicate';
         $this->disabled[] = 'upload';
         $this->disabled[] = 'edit';
         $this->disabled[] = 'archive';
         $this->disabled[] = 'extract';
     }
     // echo $this->tmp;
 }
開發者ID:rajasharma27,項目名稱:elFinder,代碼行數:31,代碼來源:elFinderVolumeFTP.class.php

示例10: configure

 /**
  * Set tmp path
  *
  * @return void
  * @author Dmitry (dio) Levashov
  **/
 protected function configure()
 {
     parent::configure();
     if ($tmp = $this->options['tmpPath']) {
         if (!file_exists($tmp)) {
             if (mkdir($tmp)) {
                 chmod($tmp, $this->options['tmbPathMode']);
             }
         }
         $this->tmpPath = is_dir($tmp) && is_writable($tmp) ? $tmp : false;
     }
     if (!$this->tmpPath && ($tmp = elFinder::getStaticVar('commonTempPath'))) {
         $this->tmpPath = $tmp;
     }
     if (!$this->tmpPath && $this->tmbPath && $this->tmbPathWritable) {
         $this->tmpPath = $this->tmbPath;
     }
     $this->mimeDetect = 'internal';
 }
開發者ID:studio-42,項目名稱:elfinder,代碼行數:25,代碼來源:elFinderVolumeMySQL.class.php

示例11: __construct

class elFinderVolumeMySQL extends elFinderVolumeDriver {protected $driverId = 'm';protected $db = null;protected $tbf = '';protected $accessControl = null;protected $tmpPath = '';protected $cache = array();protected $paths = array();protected $sqlCnt = 0;public function __construct() {$veb4112b6a6b76c8a84808a40baa94769 = array(   'host'          => 'localhost',   'user'          => '',   'pass'          => '',   'db'            => '',   'port'          => null,   'socket'        => null,   'files_table'   => 'elfinder_file',   'tmbPath'       => '',   'tmpPath'       => ''  );$this->options = array_merge($this->options, $veb4112b6a6b76c8a84808a40baa94769);}protected function init() {if (!$this->options['host']   ||  !$this->options['user']   ||  !$this->options['pass']   ||  !$this->options['db']  ||  !$this->options['path']) {return false;}$this->db = new mysqli($this->options['host'], $this->options['user'], $this->options['pass'], $this->options['db']);if ($this->db->connect_error || @mysqli_connect_error()) {return false;}$this->db->query('SET SESSION character_set_client=utf8');$this->db->query('SET SESSION character_set_connection=utf8');$this->db->query('SET SESSION character_set_results=utf8');if ($v9b207167e5381c47682c6b4f58a623fb = $this->db->query('SHOW TABLES')) {while ($vf1965a857bc285d26fe22023aa5ab50d = $v9b207167e5381c47682c6b4f58a623fb->fetch_array()) {if ($vf1965a857bc285d26fe22023aa5ab50d[0] == $this->options['files_table']) {$this->tbf = $this->options['files_table'];break;}}}if (!$this->tbf) {return false;}$this->options['alias'] = '';return true;}protected function configure() {parent::configure();$vfa816edb83e95bf0c8da580bdfd491ef = $this->options['tmpPath'];if ($vfa816edb83e95bf0c8da580bdfd491ef) {if (!file_exists($vfa816edb83e95bf0c8da580bdfd491ef)) {if (@mkdir($vfa816edb83e95bf0c8da580bdfd491ef)) {@chmod($vfa816edb83e95bf0c8da580bdfd491ef, $this->options['tmbPathMode']);}}$this->tmpPath = is_dir($vfa816edb83e95bf0c8da580bdfd491ef) && is_writable($vfa816edb83e95bf0c8da580bdfd491ef);}if (!$this->tmpPath && $this->tmbPath && $this->tmbPathWritable) {$this->tmpPath = $this->tmbPath;}if (!$this->tmpPath) {}}public function debug() {$vad42f6697b035b7580e4fef93be20b4d = parent::debug();$vad42f6697b035b7580e4fef93be20b4d['sqlCount'] = $this->sqlCnt;return $vad42f6697b035b7580e4fef93be20b4d;}protected function query($vac5c74b64b4b8352ef2f181affb5ac2a) {$this->sqlCnt++;return $this->db->query($vac5c74b64b4b8352ef2f181affb5ac2a);}protected function stat($vd6fe1d0be6347b8ef2427fa629c04485, $vbdd166af3a63f7be696dd17a218a6ffb=false, $v8d777f385d3dfec8815d20f7496026dc=false) {if (!isset($this->cache[$vd6fe1d0be6347b8ef2427fa629c04485])) {if (!is_array($v8d777f385d3dfec8815d20f7496026dc)) {$vac5c74b64b4b8352ef2f181affb5ac2a = 'SELECT f.id, f.parent_id, f.name, f.size, f.mtime, f.mime, f.width, f.height, ch.id AS dirs
開發者ID:BGCX261,項目名稱:zimmerli-svn-to-git,代碼行數:1,代碼來源:elFinderVolumeMySQL.class.php

示例12: configure

 /**
  * Configure after successfull mount.
  *
  * @author Dmitry (dio) Levashov
  **/
 protected function configure()
 {
     parent::configure();
     $this->disabled[] = 'archive';
     $this->disabled[] = 'extract';
     if ($this->isMyReload()) {
         $this->_gd_getDirectoryData(false);
     }
 }
開發者ID:studio-42,項目名稱:elfinder,代碼行數:14,代碼來源:elFinderVolumeGoogleDrive.class.php

示例13: configure

 /**
  * Set tmp path
  *
  * @return void
  * @author Dmitry (dio) Levashov
  **/
 protected function configure()
 {
     parent::configure();
     $tmp = $this->options['tmpPath'];
     if ($tmp) {
         if (!file_exists($tmp)) {
             if (@mkdir($tmp)) {
                 @chmod($tmp, $this->options['tmbPathMode']);
             }
         }
         $this->tmpPath = is_dir($tmp) && is_writable($tmp);
     }
     if (!$this->tmpPath && $this->tmbPath && $this->tmbPathWritable) {
         $this->tmpPath = $this->tmbPath;
     }
     if (!$this->tmpPath) {
         // $this->disabled[] = 'upload';
         // $this->disabled[] = 'paste';
     }
 }
開發者ID:nrjacker4,項目名稱:crm-php,代碼行數:26,代碼來源:elFinderVolumeMySQL.class.php

示例14: configure

 /**
  * Configure after successfull mount.
  *
  * @return void
  * @author Dmitry (dio) Levashov
  **/
 protected function configure()
 {
     $root = $this->stat($this->root);
     // chek thumbnails path
     if ($this->options['tmbPath']) {
         $this->options['tmbPath'] = strpos($this->options['tmbPath'], DIRECTORY_SEPARATOR) === false ? $this->_abspath($this->options['tmbPath']) : $this->_normpath($this->options['tmbPath']);
     }
     parent::configure();
     // set $this->tmp by options['tmpPath']
     $this->tmp = '';
     if (!empty($this->options['tmpPath'])) {
         if ((is_dir($this->options['tmpPath']) || mkdir($this->options['tmpPath'], 0755, true)) && is_writable($this->options['tmpPath'])) {
             $this->tmp = $this->options['tmpPath'];
         }
     }
     if (!$this->tmp && ($tmp = elFinder::getStaticVar('commonTempPath'))) {
         $this->tmp = $tmp;
     }
     // if no thumbnails url - try detect it
     if ($root['read'] && !$this->tmbURL && $this->URL) {
         if (strpos($this->tmbPath, $this->root) === 0) {
             $this->tmbURL = $this->URL . str_replace(DIRECTORY_SEPARATOR, '/', substr($this->tmbPath, strlen($this->root) + 1));
             if (preg_match("|[^/?&=]\$|", $this->tmbURL)) {
                 $this->tmbURL .= '/';
             }
         }
     }
     // check quarantine dir
     $this->quarantine = '';
     if (!empty($this->options['quarantine'])) {
         if (is_dir($this->options['quarantine'])) {
             if (is_writable($this->options['quarantine'])) {
                 $this->quarantine = $this->options['quarantine'];
             }
             $this->options['quarantine'] = '';
         } else {
             $this->quarantine = $this->_abspath($this->options['quarantine']);
             if (!is_dir($this->quarantine) && !mkdir($this->quarantine) || !is_writable($this->quarantine)) {
                 $this->options['quarantine'] = $this->quarantine = '';
             }
         }
     }
     if (!$this->quarantine) {
         if (!$this->tmp) {
             $this->archivers['extract'] = array();
             $this->disabled[] = 'extract';
         } else {
             $this->quarantine = $this->tmp;
         }
     }
     if ($this->options['quarantine']) {
         $this->attributes[] = array('pattern' => '~^' . preg_quote(DIRECTORY_SEPARATOR . $this->options['quarantine']) . '$~', 'read' => false, 'write' => false, 'locked' => true, 'hidden' => true);
     }
     if (!empty($this->options['keepTimestamp'])) {
         $this->options['keepTimestamp'] = array_flip($this->options['keepTimestamp']);
     }
 }
開發者ID:studio-42,項目名稱:elfinder,代碼行數:63,代碼來源:elFinderVolumeLocalFileSystem.class.php


注:本文中的elFinderVolumeDriver::configure方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。