本文整理汇总了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';
}
}
示例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';
}
示例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';
}
示例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);
}
示例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';
}
示例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) {
}
}
示例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';
}
}
示例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';
}
}
示例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;
}
示例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';
}
示例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
示例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);
}
}
示例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';
}
}
示例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']);
}
}