本文整理汇总了PHP中RokCommon_Service::setTempFileDir方法的典型用法代码示例。如果您正苦于以下问题:PHP RokCommon_Service::setTempFileDir方法的具体用法?PHP RokCommon_Service::setTempFileDir怎么用?PHP RokCommon_Service::setTempFileDir使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RokCommon_Service
的用法示例。
在下文中一共展示了RokCommon_Service::setTempFileDir方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* @param $subject
* @param array $config
*/
public function __construct(&$subject, $config = array())
{
parent::__construct($subject, $config);
if ($this->loadCommonLib()) {
if (!defined('ROKCOMMON')) {
$error_string = 'RokCommon System Plug-in is missing the RokCommon Library. Please Reinstall.';
} else if (ROKCOMMON != self::ROKCOMMON_PLUGIN_VERSION) {
$error_string = sprintf('RokCommon Library Version (%s) does not match the RokCommon System Plug-in Version (%s). Please Reinstall.', ROKCOMMON, self::ROKCOMMON_PLUGIN_VERSION);
}
if (!empty($error_string)) {
if (JError::$legacy) {
return JError::raiseWarning(500, $error_string);
} else {
throw new Exception($error_string);
}
} else {
RokCommon_ClassLoader::addPath(dirname(__FILE__) . '/lib');
$conf = JFactory::getConfig();
RokCommon_Service::setTempFileDir($conf->get('tmp_path'));
RokCommon_Service::setDevelopmentMode($this->params->get('developmentMode', false));
$this->contaier = RokCommon_Service::getContainer();
$this->logger = $this->contaier->logger;
$this->dispatcher = $this->contaier->dispatcher;
$this->processRegisteredConfigs();
if (!defined('ROKCOMMON_PLUGIN_LOADED')) define('ROKCOMMON_PLUGIN_LOADED', self::ROKCOMMON_PLUGIN_VERSION);
}
}
}
示例2: __construct
/**
* @param $subject
* @param array $config
*/
public function __construct(&$subject, $config = array())
{
if ($this->loadCommonLib()) {
if (!defined('ROKCOMMON')) {
$error_string = 'RokCommon System Plug-in is missing the RokCommon Library. Please Reinstall.';
} elseif (ROKCOMMON != self::ROKCOMMON_PLUGIN_VERSION) {
$error_string = sprintf('RokCommon Library Version (%s) does not match the RokCommon System Plug-in Version (%s). Please Reinstall.', ROKCOMMON, self::ROKCOMMON_PLUGIN_VERSION);
}
if (!empty($error_string)) {
JFactory::getApplication()->enqueueMessage($error_string, 'warning');
return;
}
// Only register plugin on success.
parent::__construct($subject, $config);
RokCommon_ClassLoader::addPath(dirname(__FILE__) . '/lib');
$conf = JFactory::getConfig();
RokCommon_Service::setTempFileDir($conf->get('tmp_path'));
RokCommon_Service::setDevelopmentMode($this->params->get('developmentMode', false));
$this->container = RokCommon_Service::getContainer();
$this->logger = $this->container->logger;
$this->dispatcher = $this->container->dispatcher;
$this->processRegisteredConfigs();
if (!defined('ROKCOMMON_PLUGIN_LOADED')) {
define('ROKCOMMON_PLUGIN_LOADED', self::ROKCOMMON_PLUGIN_VERSION);
}
}
}
示例3: setDevelopmentMode
}
return $ret;
}
/**
* @param boolean $developmentMode
*/
public static function setDevelopmentMode($developmentMode)
{
self::$developmentMode = $developmentMode;
}
/**
* @return boolean
*/
public static function getDevelopmentMode()
{
return self::$developmentMode;
}
/**
* @static
*
* @param $path
*/
public static function setTempFileDir($path)
{
if (@is_dir($path) && @is_writable($path)) {
self::$tmp_file_dir = $path;
}
}
}
RokCommon_Service::setTempFileDir(sys_get_temp_dir());