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


PHP JTable::_includePaths方法代码示例

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


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

示例1: addIncludePath

 /**
  * Add a filesystem path where JTable should search for table class files.
  * You may either pass a string or an array of paths.
  *
  * @param   mixed  $path  A filesystem path or array of filesystem paths to add.
  *
  * @return  array  An array of filesystem paths to find JTable classes in.
  *
  * @link    http://docs.joomla.org/JTable/addIncludePath
  * @since   11.1
  */
 public static function addIncludePath($path = null)
 {
     // If the internal paths have not been initialised, do so with the base table path.
     if (empty(self::$_includePaths)) {
         self::$_includePaths = array(__DIR__);
     }
     // Convert the passed path(s) to add to an array.
     settype($path, 'array');
     // If we have new paths to add, do so.
     if (!empty($path) && !in_array($path, self::$_includePaths)) {
         // Check and add each individual new path.
         foreach ($path as $dir) {
             // Sanitize path.
             $dir = trim($dir);
             // Add to the front of the list so that custom paths are searched first.
             array_unshift(self::$_includePaths, $dir);
         }
     }
     return self::$_includePaths;
 }
开发者ID:ranwaldo,项目名称:joomla-platform,代码行数:31,代码来源:table.php


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