本文整理汇总了PHP中elFinder::sessionDataEncode方法的典型用法代码示例。如果您正苦于以下问题:PHP elFinder::sessionDataEncode方法的具体用法?PHP elFinder::sessionDataEncode怎么用?PHP elFinder::sessionDataEncode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类elFinder
的用法示例。
在下文中一共展示了elFinder::sessionDataEncode方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: saveNetVolumes
/**
* Save network volumes config.
*
* @param array $volumes volumes config
* @return void
* @author Dmitry (dio) Levashov
*/
protected function saveNetVolumes($volumes)
{
$_SESSION[$this->netVolumesSessionKey] = elFinder::sessionDataEncode($volumes);
}
示例2: saveNetVolumes
/**
* Save network volumes config.
*
* @param array $volumes volumes config
* @return void
* @author Dmitry (dio) Levashov
*/
protected function saveNetVolumes($volumes)
{
// try session restart
@session_start();
$_SESSION[$this->netVolumesSessionKey] = elFinder::sessionDataEncode($volumes);
elFinder::sessionWrite();
}
示例3: stat
/**
* Return fileinfo
*
* @param string $path file cache
* @return array
* @author Dmitry (dio) Levashov
**/
protected function stat($path)
{
if ($path === false || is_null($path)) {
return false;
}
$is_root = $path == $this->root;
if ($is_root) {
$rootKey = md5($path);
if (!isset($this->sessionCache['rootstat'])) {
$this->sessionCache['rootstat'] = array();
}
if (!$this->isMyReload()) {
// need $path as key for netmount/netunmount
if (isset($this->sessionCache['rootstat'][$rootKey])) {
if ($ret = elFinder::sessionDataDecode($this->sessionCache['rootstat'][$rootKey], 'array')) {
return $ret;
}
}
}
}
$ret = isset($this->cache[$path]) ? $this->cache[$path] : $this->updateCache($path, $this->convEncOut($this->_stat($this->convEncIn($path))));
if ($is_root) {
$this->sessionRestart();
$this->sessionCache['rootstat'][$rootKey] = elFinder::sessionDataEncode($ret);
elFinder::sessionWrite();
}
return $ret;
}
示例4: stat
/**
* Return fileinfo
*
* @param string $path file cache
* @return array
* @author Dmitry (dio) Levashov
**/
protected function stat($path)
{
if ($path === false || is_null($path)) {
return false;
}
$is_root = $path === $this->root;
if ($is_root) {
$rootKey = md5($path);
if (!isset($this->sessionCache['rootstat'])) {
$this->sessionCache['rootstat'] = array();
}
if (empty($this->ARGS['reload']) || empty($this->ARGS['target']) || strpos($this->ARGS['target'], $this->id) !== 0) {
// need $path as key for netmount/netunmount
if (isset($this->sessionCache['rootstat'][$rootKey])) {
if ($ret = elFinder::sessionDataDecode($this->sessionCache['rootstat'][$rootKey], 'array')) {
return $ret;
}
}
}
}
$ret = isset($this->cache[$path]) ? $this->cache[$path] : $this->updateCache($path, $this->convEncOut($this->_stat($this->convEncIn($path))));
if ($is_root) {
$this->sessionCache['rootstat'][$rootKey] = elFinder::sessionDataEncode($ret);
}
return $ret;
}