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


PHP RokCommon_Service::setTempFileDir方法代码示例

本文整理汇总了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);
			}
		}
	}
开发者ID:networksoft,项目名称:networksoft.com.co,代码行数:35,代码来源:rokcommon.php

示例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);
         }
     }
 }
开发者ID:densem-2013,项目名称:exikom,代码行数:31,代码来源:rokcommon.php

示例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());
开发者ID:networksoft,项目名称:networksoft.com.co,代码行数:30,代码来源:Service.php


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