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


PHP static::paths方法代码示例

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


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

示例1: path

 /**
  * Add paths
  * @param Array|String $path
  */
 public static function path($path)
 {
     if (!is_array($path)) {
         $path = array($path);
     }
     static::$paths = static::$paths + $path;
 }
开发者ID:yunaid,项目名称:yf,代码行数:11,代码来源:Text.php

示例2: addPath

 /**
  * Adds a template path to search in.
  *
  * @param string|array $path
  */
 public static function addPath($path, $prepend = false)
 {
     if ($prepend) {
         static::$paths = array_merge([$path], static::$paths);
     } else {
         static::$paths[] = $path;
     }
 }
开发者ID:nirix,项目名称:unframework,代码行数:13,代码来源:View.php

示例3: set_path

 public static function set_path($name, $value = null)
 {
     if (is_array($name)) {
         static::$paths = array_replace(static::$paths, $name);
     } else {
         static::$paths[$name] = $value;
     }
 }
开发者ID:levmorozov,项目名称:mii,代码行数:8,代码来源:Mii.php

示例4: initialize

 public static function initialize($paths, $baseNamespace = 'App')
 {
     static::$baseNamespace = rtrim($baseNamespace, '\\') . '\\';
     static::$config = new Config(APP_LOCAL ? $paths['config'] . 'local/' : $paths['config']);
     static::$paths = $paths;
     static::$loader = new Loader();
     static::$loader->registerNamespaces([static::$baseNamespace . 'Assets' => $paths['assets'], static::$baseNamespace . 'Bootstrap' => $paths['bootstrap'], static::$baseNamespace . 'Components' => $paths['components'], static::$baseNamespace . 'Helpers' => $paths['helpers'], static::$baseNamespace . 'Libraries' => $paths['libraries'], static::$baseNamespace . 'Models' => $paths['models'], static::$baseNamespace . 'Modules' => $paths['modules']]);
     static::$loader->register();
 }
开发者ID:panlatent,项目名称:swilab,代码行数:9,代码来源:BaseSwilab.php

示例5: initialize

 protected static function initialize()
 {
     if (static::$initialized) {
         return;
     }
     static::$initialized = true;
     static::$parentPath = __FILE__;
     for ($i = substr_count(get_class(), static::$nsChar); $i >= 0; $i--) {
         static::$parentPath = dirname(static::$parentPath);
     }
     static::$paths = array();
     static::$files = array(__FILE__);
 }
开发者ID:smileytechguy,项目名称:nLine,代码行数:13,代码来源:loader.php

示例6: getPath

 /**
  * @param string $type
  *
  * @return bool|array|string
  */
 private static function getPath($type = null)
 {
     if (null === static::$paths) {
         $rootDir = getcwd();
         $appDir = $rootDir . '/app';
         $srcDir = $rootDir . '/src';
         $venDir = $rootDir . '/vendor';
         static::$paths = array('root' => $rootDir, 'app' => $appDir, 'config' => $appDir . '/config', 'cache' => $appDir . '/cache', 'source' => $srcDir, 'vendor' => $venDir);
     }
     if (null === $type) {
         return static::$paths;
     }
     if (!isset(static::$paths[$type])) {
         return false;
     }
     return static::$paths[$type];
 }
开发者ID:d4rk4ng3l,项目名称:aom,代码行数:22,代码来源:InstallationHelper.php

示例7: setAppRootPath

 /**
  * Set the application root directory.
  *
  * @param string $rootPath Path of the application's root.
  */
 public function setAppRootPath($rootPath = null)
 {
     $root = $this->removeTrailingSlash($rootPath === null ? getcwd() : $rootPath);
     static::$paths = array_merge(static::$paths, ['app' => $root, 'web' => "{$root}/Web", 'vendor' => "{$root}/vendor", 'config' => "{$root}/Config", 'layouts' => "{$root}/Layouts", 'modules' => "{$root}/Modules"]);
     return $this;
 }
开发者ID:Soneritics,项目名称:Framework,代码行数:11,代码来源:Folders.php

示例8: paths

 static function paths($paths)
 {
     static::$paths = static::norm_paths($paths);
 }
开发者ID:SerdarSanri,项目名称:TextPub,代码行数:4,代码来源:api.php

示例9: reset

 /**
  * @return void
  */
 public static function reset()
 {
     static::$paths = array(__DIR__);
     static::$exts = array('php');
 }
开发者ID:nguyen113,项目名称:Rai5,代码行数:8,代码来源:ClassicLoader.php

示例10: setPaths

 public static function setPaths($options)
 {
     static::$paths = $options;
 }
开发者ID:avil13,项目名称:ModelResorces,代码行数:4,代码来源:ModelResorcesController.php

示例11: setPaths

 /**
  * @param $paths
  * @return $this
  */
 protected function setPaths($paths)
 {
     static::$paths = $paths;
     return $this;
 }
开发者ID:sanjoydesk,项目名称:framework,代码行数:9,代码来源:Config.php

示例12: _init

 /**
  * Static init load the paths and urls from the configuration
  *
  * @return void
  */
 public static function _init()
 {
     static::$paths = ClanCats::$config->get('storage.paths');
     static::$urls = ClanCats::$config->get('storage.urls');
 }
开发者ID:clancats,项目名称:core,代码行数:10,代码来源:CCStorage.php

示例13: run

 /**
  * Run loader
  * 
  * @param array $paths autoload directories
  * 
  * @return boolean
  */
 public static function run(array $paths = array())
 {
     static::$paths = array_merge(static::$paths, $paths);
     return spl_autoload_register('Chochan\\Autoload\\Loader::load');
 }
开发者ID:g-alonso,项目名称:chochan,代码行数:12,代码来源:Loader.php

示例14: set_paths

 /**
  * 设置paths
  */
 protected static function set_paths($name = null)
 {
     if (is_null($name)) {
         $name = isset($_SERVER['PATH_INFO']) ? $_SERVER['PATH_INFO'] : '';
     }
     if (!empty($name)) {
         $paths = trim($name, '/');
         if ($paths !== '') {
             static::$paths = explode('/', $paths);
         }
     }
 }
开发者ID:minowu,项目名称:smartthink,代码行数:15,代码来源:Dispatch.php

示例15: add_path

 /**
  * Add paths
  *
  * @param string|array $path
  */
 public static function add_path($path)
 {
     static::$paths = array_merge(static::$paths, (array) $path);
 }
开发者ID:egig,项目名称:CodeIgniter-HMVC-Support,代码行数:9,代码来源:Modules.php


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