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


PHP Assets::assets_dir方法代码示例

本文整理汇总了PHP中Assets::assets_dir方法的典型用法代码示例。如果您正苦于以下问题:PHP Assets::assets_dir方法的具体用法?PHP Assets::assets_dir怎么用?PHP Assets::assets_dir使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Assets的用法示例。


在下文中一共展示了Assets::assets_dir方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: set_path

 /**
  * Set a different assets path
  * @param string $path
  */
 public static function set_path($path = null)
 {
     self::init();
     if ($path) {
         self::$assets_dir = $path;
     }
     self::_paths();
 }
开发者ID:NaszvadiG,项目名称:Base-CodeIgniter-App,代码行数:12,代码来源:assets.php

示例2: __construct

 /**
  * Constructor
  *
  * @return void
  */
 public function __construct()
 {
     /*
      * Instanciar codeigniter
      */
     $this->ci =& get_instance();
     /*
      * Cragar helper url
      */
     $this->ci->load->helper('url');
     /*
      * Cargar variable global CSRF
      */
     self::agregar_var_js(array('tkn' => $this->ci->security->get_csrf_hash()));
     $config = $this->ci->load->config('minify', TRUE, TRUE);
     /**
      * Inicializar
      * Minify LibraryClass.
      */
     // user specified settings from config file
     self::$assets_dir = $this->ci->config->item('assets_dir', 'minify') ?: self::$assets_dir;
     self::$css_dir = $this->ci->config->item('css_dir', 'minify') ?: self::$css_dir;
     self::$js_dir = $this->ci->config->item('js_dir', 'minify') ?: self::$js_dir;
     self::$css_file = $this->ci->config->item('css_file', 'minify') ?: self::$css_file;
     self::$js_file = $this->ci->config->item('js_file', 'minify') ?: self::$js_file;
     self::$auto_names = $this->ci->config->item('auto_names', 'minify') ?: self::$auto_names;
     self::$compress = $this->ci->config->item('compress', 'minify') ?: self::$compress;
     self::$compression_engine = $this->ci->config->item('compression_engine', 'minify') ?: self::$compression_engine;
     //$this->closurecompiler = $this->ci->config->item('closurecompiler', 'minify');
     if (count($config) > 0) {
         // custom config array
         foreach ($config as $key => $val) {
             if (isset($this->{$key})) {
                 $this->{$key} = $val;
             }
         }
     }
     // perform checks
     $this->_config_checks();
 }
开发者ID:acampos1916,项目名称:corcione_produccion,代码行数:45,代码来源:Assets.php

示例3: setPath

 /**
  * Sets path to the assets directory
  * @param string $path
  * @return bool
  * @throws \Assets\AssetsException
  * @internal param string $dir
  */
 public static function setPath($path = '')
 {
     // Directory Exist?
     if (!is_dir($path)) {
         throw new Assets\AssetsException('The provided directory "' . $path . '" does not exist.');
     }
     // Set path
     self::$assets_dir = $path;
 }
开发者ID:bradstinson,项目名称:assets,代码行数:16,代码来源:Assets.php


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