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


PHP VmTable::addIncludePath方法代码示例

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


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

示例1: loadVm

 /**
  * method must be called after preflight
  * Sets the paths and loads VMFramework config
  */
 public function loadVm()
 {
     // 			$this->path = JInstaller::getInstance()->getPath('extension_administrator');
     if (empty($this->path)) {
         $this->path = VMPATH_ADMIN;
     }
     if (!class_exists('VmConfig')) {
         require_once $this->path . '/helpers/config.php';
     }
     VmConfig::loadConfig(false, true);
     VmTable::addIncludePath($this->path . DS . 'tables');
     VmModel::addIncludePath($this->path . DS . 'models');
 }
开发者ID:brenot,项目名称:forumdesenvolvimento,代码行数:17,代码来源:script.virtuemart.php

示例2: defined

defined('JPATH_VM_SITE') or define('JPATH_VM_SITE', VMPATH_SITE);
defined('JPATH_VM_ADMINISTRATOR') or define('JPATH_VM_ADMINISTRATOR', VMPATH_ADMIN);
// define( 'VMPATH_ADMIN', JPATH_ROOT.DS.'administrator'.DS.'components'.DS.'com_virtuemart' );
define('JPATH_VM_PLUGINS', VMPATH_PLUGINLIBS);
define('JPATH_VM_MODULES', VMPATH_MODULES);
defined('VM_VERSION') or define('VM_VERSION', 3);
//This number is for obstruction, similar to the prefix jos_ of joomla it should be avoided
//to use the standard 7, choose something else between 1 and 99, it is added to the ordernumber as counter
// and must not be lowered.
defined('VM_ORDER_OFFSET') or define('VM_ORDER_OFFSET', 3);
require VMPATH_ADMIN . DS . 'version.php';
defined('VM_REV') or define('VM_REV', vmVersion::$REVISION);
if (!class_exists('VmTable')) {
    require VMPATH_ADMIN . DS . 'helpers' . DS . 'vmtable.php';
}
VmTable::addIncludePath(VMPATH_ADMIN . DS . 'tables');
if (!class_exists('VmModel')) {
    require VMPATH_ADMIN . DS . 'helpers' . DS . 'vmmodel.php';
}
if (!class_exists('vRequest')) {
    require VMPATH_ADMIN . DS . 'helpers' . DS . 'vrequest.php';
}
if (!class_exists('vmText')) {
    require VMPATH_ADMIN . DS . 'helpers' . DS . 'vmtext.php';
}
if (!class_exists('vmJsApi')) {
    require VMPATH_ADMIN . DS . 'helpers' . DS . 'vmjsapi.php';
}
/**
 * Where type can be one of
 * 'warning' - yellow
开发者ID:brenot,项目名称:forumdesenvolvimento,代码行数:31,代码来源:config.php

示例3: addTablePath

 /**
  * Adds to the stack of model table paths in LIFO order.
  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
  * @license     GNU General Public License version 2 or later; see LICENSE
  *
  * @param   mixed  $path  The directory as a string or directories as an array to add.
  *
  * @return  void
  *
  * @since   12.2
  */
 public static function addTablePath($path)
 {
     VmTable::addIncludePath($path);
 }
开发者ID:thumbs-up-sign,项目名称:TuVanDuAn,代码行数:15,代码来源:vmmodel.php

示例4: getInstance

 /**
  * Static method to get an instance of a JTable class if it can be found in
  * the table include paths.  To add include paths for searching for JTable
  * classes @see JTable::addIncludePath().
  *
  * @copyright   Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved.
  * @param   string  $type    The type (name) of the JTable class to get an instance of.
  * @param   string  $prefix  An optional prefix for the table class name.
  * @param   array   $config  An optional array of configuration values for the JTable object.
  *
  * @return  mixed    A JTable object if found or boolean false if one could not be found.
  *
  * @link	http://docs.joomla.org/JTable/getInstance
  * @since   11.1
  */
 public static function getInstance($type, $prefix = 'VmTable', $config = array())
 {
     // Sanitize and prepare the table class name.
     $type = preg_replace('/[^A-Z0-9_\\.-]/i', '', $type);
     $tableClass = $prefix . ucfirst($type);
     // Only try to load the class if it doesn't already exist.
     if (!class_exists($tableClass)) {
         // Search for the class file in the JTable include paths.
         jimport('joomla.filesystem.path');
         $paths = VmTable::addIncludePath();
         $pathIndex = 0;
         while (!class_exists($tableClass) && $pathIndex < count($paths)) {
             if ($tryThis = JPath::find($paths[$pathIndex++], strtolower($type) . '.php')) {
                 // Import the class file.
                 include_once $tryThis;
             }
         }
         if (!class_exists($tableClass)) {
             vmdebug('Did nto find file in ', $paths, $tryThis);
             // If we were unable to find the class file in the JTable include paths, raise a warning and return false.
             //JError::raiseWarning(0, JText::sprintf('JLIB_DATABASE_ERROR_NOT_SUPPORTED_FILE_NOT_FOUND', $type));
             return false;
         }
     }
     // If a database object was passed in the configuration array use it, otherwise get the global one from JFactory.
     $db = isset($config['dbo']) ? $config['dbo'] : JFactory::getDbo();
     // Instantiate a new table class and return it.
     return new $tableClass($db);
 }
开发者ID:brenot,项目名称:forumdesenvolvimento,代码行数:44,代码来源:vmtable.php


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