• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP VQMod类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: modelFromDirectory

 /**
  * Allows loading from a specified directory instead of DIR_APPLICATION
  *
  * @param $model
  * @param $directory
  * @throws Exception when file was not found
  */
 private function modelFromDirectory($model, $directory)
 {
     if (!$directory) {
         $directory = DIR_APPLICATION;
     }
     $file = $directory . '/model/' . $model . '.php';
     $class = 'Model' . preg_replace('/[^a-zA-Z0-9]/', '', $model);
     if (file_exists($file)) {
         if (class_exists('VQMod')) {
             include_once VQMod::modCheck(modification($file), $file);
         } else {
             include_once $file;
         }
         $this->registry->set('model_' . str_replace('/', '_', $model), new $class($this->registry));
     } else {
         throw new Exception('Model not found', 404);
     }
 }
开发者ID:projectwife,项目名称:tesitoo-opencart,代码行数:25,代码来源:loader.php


示例2: execute

 private function execute($action)
 {
     if (method_exists($action, 'getFile')) {
         if (file_exists($action->getFile())) {
             require_once VQMod::modCheck($action->getFile());
             $class = $action->getClass();
             $controller = new $class($this->registry);
             if (is_callable(array($controller, $action->getMethod()))) {
                 $action = call_user_func_array(array($controller, $action->getMethod()), $action->getArgs());
             } else {
                 $action = $this->error;
                 $this->error = '';
             }
         } else {
             $action = $this->error;
             $this->error = '';
         }
     } else {
         $result = $action->execute($this->registry);
         if (is_object($result)) {
             $action = $result;
         } elseif ($result === false) {
             $action = $this->error;
             $this->error = '';
         } else {
             $action = false;
         }
     }
     return $action;
 }
开发者ID:deepakdesai,项目名称:CressoyoWebApp,代码行数:30,代码来源:vq2-system_engine_front.php


示例3: vqmod_resolve

 public function vqmod_resolve($file)
 {
     if (class_exists('VQMod')) {
         $is_static = false;
         $folder = dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR . 'vqmod' . DIRECTORY_SEPARATOR;
         $vqmod_file_contents = file_get_contents($folder . 'vqmod.php');
         $is_static = stripos($vqmod_file_contents, 'public static function modCheck') !== FALSE;
         if ($is_static) {
             $file = VQMod::modCheck($file);
         } else {
             $vqmod = new VQMod();
             $file = $vqmod->modCheck($file);
             unset($vqmod);
         }
     }
     return $file;
 }
开发者ID:artlabsdesign,项目名称:missbloom,代码行数:17,代码来源:nitro_db.php


示例4: autoload

function autoload($class)
{
    $file = DIR_SYSTEM . 'library/' . str_replace('\\', '/', strtolower($class)) . '.php';
    if (is_file($file)) {
        include_once VQMod::modCheck(modification($file), $file);
        return true;
    }
    return false;
}
开发者ID:rootcave,项目名称:9livesprints-web,代码行数:9,代码来源:vq2-system_startup.php


示例5: __construct

 public function __construct($driver, $hostname, $username, $password, $database)
 {
     if (file_exists(DIR_DATABASE . $driver . '.php')) {
         require_once VQMod::modCheck(DIR_DATABASE . $driver . '.php');
     } else {
         exit('Error: Could not load database file ' . $driver . '!');
     }
     $this->driver = new $driver($hostname, $username, $password, $database);
 }
开发者ID:ngogiangthanh,项目名称:choloncantho-final,代码行数:9,代码来源:vq2-system_library_db.php


示例6: query

 public function query($sql)
 {
     require_once VQMod::modCheck(DIR_SYSTEM . 'nitro/config.php');
     require_once VQMod::modCheck(DIR_SYSTEM . 'nitro/core/core.php');
     $nitroPersistence = getNitroPersistence();
     if (!empty($nitroPersistence['Nitro']['Enabled']) && $nitroPersistence['Nitro']['Enabled'] == 'yes' && !empty($nitroPersistence['Nitro']['DBCache']['Enabled']) && $nitroPersistence['Nitro']['DBCache']['Enabled'] == 'yes') {
         $nitro_matches = array();
         $nitro_match = false;
         // Product COUNT Queries
         if (!empty($nitroPersistence['Nitro']['DBCache']['ProductCountQueries']) && $nitroPersistence['Nitro']['DBCache']['ProductCountQueries'] == 'yes') {
             $nitro_match = preg_match('~SELECT.*COUNT\\(.*FROM.*[^0-9a-zA-Z_]' . DB_PREFIX . '(product)([\\s]|$)~i', $sql, $nitro_matches);
         }
         // Category COUNT Queries
         if (!$nitro_match && !empty($nitroPersistence['Nitro']['DBCache']['CategoryCountQueries']) && $nitroPersistence['Nitro']['DBCache']['CategoryCountQueries'] == 'yes') {
             $nitro_match = preg_match('~SELECT.*COUNT\\(.*FROM.*[^0-9a-zA-Z_]' . DB_PREFIX . '(category)([\\s]|$)~i', $sql, $nitro_matches);
         }
         // Category Queries
         if (!$nitro_match && !empty($nitroPersistence['Nitro']['DBCache']['CategoryQueries']) && $nitroPersistence['Nitro']['DBCache']['CategoryQueries'] == 'yes') {
             $nitro_match = preg_match('~SELECT.*FROM.*[^0-9a-zA-Z_]' . DB_PREFIX . '(category)([\\s]|$)~i', $sql, $nitro_matches);
         }
         // SEO URLs Queries
         if (!$nitro_match && !empty($nitroPersistence['Nitro']['DBCache']['SeoUrls']) && $nitroPersistence['Nitro']['DBCache']['SeoUrls'] == 'yes') {
             $nitro_match = preg_match('~SELECT.*FROM.*[^0-9a-zA-Z_]' . DB_PREFIX . '(url_alias)([\\s]|$)~i', $sql, $nitro_matches);
         }
         // Search Queries
         if (!$nitro_match && !empty($nitroPersistence['Nitro']['DBCache']['Search']) && $nitroPersistence['Nitro']['DBCache']['Search'] == 'yes') {
             $nitro_match = preg_match('~SELECT.*WHERE.*(LIKE|MATCH)~i', $sql, $nitro_matches);
             if ($nitro_match) {
                 $nitro_match = false;
                 if (!empty($nitroPersistence['Nitro']['DBCache']['SearchKeywords'])) {
                     $nitro_keywords = explode(",", $nitroPersistence['Nitro']['DBCache']['SearchKeywords']);
                     foreach ($nitro_keywords as $nitro_keyword) {
                         if (stripos(trim($nitro_keyword), $sql) !== FALSE) {
                             $nitro_match = true;
                             break;
                         }
                     }
                 }
             }
         }
         if ($nitro_match) {
             require_once VQMod::modCheck(DIR_SYSTEM . 'nitro/core/dbcache.php');
             $nitro_cache_selector = strtolower($nitro_matches[1]) . '.' . md5($sql);
             // category.6ef5cee93ce985fe9de730a1d837455d
             $nitro_result = getNitroDBCache($nitro_cache_selector);
             if ($nitro_result !== FALSE) {
                 return $nitro_result;
             }
         }
     }
     if (!empty($nitro_cache_selector)) {
         $nitro_db_result = $this->driver->query($sql);
         setNitroDBCache($nitro_cache_selector, $nitro_db_result);
         return $nitro_db_result;
     }
     return $this->driver->query($sql);
 }
开发者ID:BulatSa,项目名称:Ctex,代码行数:57,代码来源:vq2-system_library_db.php


示例7: _autoloadController

 private static function _autoloadController($class)
 {
     preg_match_all('/((?:^|[A-Z])[a-z]+)/', $class, $matches);
     if (isset($matches[0][1]) && isset($matches[0][2])) {
         $file = DIR_APPLICATION . 'controller/' . strtolower($matches[0][1]) . '/' . strtolower($matches[0][2]) . '.php';
         if (file_exists($file)) {
             require_once VQMod::modCheck(VQMod::modCheck($file));
         }
     }
 }
开发者ID:ngogiangthanh,项目名称:choloncantho-final,代码行数:10,代码来源:vq2-system_library_msloader.php


示例8: helper

 public function helper($helper)
 {
     $file = DIR_SYSTEM . 'helper/' . str_replace('../', '', (string) $helper) . '.php';
     if (file_exists($file)) {
         include_once VQMod::modCheck(modification($file), $file);
     } else {
         trigger_error('Error: Could not load helper ' . $file . '!');
         exit;
     }
 }
开发者ID:phucsystem,项目名称:sannhaonline,代码行数:10,代码来源:vq2-system_storage_modification_system_engine_loader.php


示例9: helper

 public function helper($helper)
 {
     $file = DIR_SYSTEM . 'helper/' . $helper . '.php';
     if (file_exists($file)) {
         include_once VQMod::modCheck($file);
     } else {
         trigger_error('Error: Could not load helper ' . $file . '!');
         exit;
     }
 }
开发者ID:mirzavu,项目名称:clothfarm,代码行数:10,代码来源:vq2-system_engine_loader.php


示例10: autoload

function autoload($class)
{
    $file = DIR_SYSTEM . 'library/' . str_replace('\\', '/', strtolower($class)) . '.php';
    if (file_exists($file)) {
        include VQMod::modCheck(modification($file));
        return true;
    } else {
        return false;
    }
}
开发者ID:nguyendev,项目名称:Opencart,代码行数:10,代码来源:vq2-system_startup.php


示例11: __construct

 public function __construct($driver, $hostname, $username, $password, $database)
 {
     $file = DIR_DATABASE . $driver . '.php';
     if (file_exists($file)) {
         require_once VQMod::modCheck($file);
         $class = 'DB' . $driver;
         $this->driver = new $class($hostname, $username, $password, $database);
     } else {
         exit('Error: Could not load database driver type ' . $driver . '!');
     }
 }
开发者ID:deepakdesai,项目名称:CressoyoWebApp,代码行数:11,代码来源:vq2-system_library_db.php


示例12: load

 public function load($filename)
 {
     $file = DIR_CONFIG . $filename . '.php';
     if (file_exists($file)) {
         $_ = array();
         require VQMod::modCheck($file);
         $this->data = array_merge($this->data, $_);
     } else {
         trigger_error('Error: Could not load config ' . $filename . '!');
         exit;
     }
 }
开发者ID:ngogiangthanh,项目名称:choloncantho-final,代码行数:12,代码来源:vq2-system_library_config.php


示例13: database

 public function database($driver, $hostname, $username, $password, $database)
 {
     $file = DIR_SYSTEM . 'database/' . $driver . '.php';
     $class = 'Database' . preg_replace('/[^a-zA-Z0-9]/', '', $driver);
     if (file_exists($file)) {
         include_once VQMod::modCheck($file);
         $this->registry->set(str_replace('/', '_', $driver), new $class($hostname, $username, $password, $database));
     } else {
         trigger_error('Error: Could not load database ' . $driver . '!');
         exit;
     }
 }
开发者ID:blogfor,项目名称:pci,代码行数:12,代码来源:vq2-system_engine_loader.php


示例14: modCheck

 public static function modCheck($file)
 {
     global $vqmod;
     if (class_exists('VQMod')) {
         if (isset($vqmod) && is_object($vqmod)) {
             return $vqmod->modCheck($file);
         }
         if (isset(VQMod::$_vqversion)) {
             return VQMod::modCheck($file);
         }
     }
     return $file;
 }
开发者ID:blogfor,项目名称:pcu,代码行数:13,代码来源:ka_vqmod.php


示例15: load

 public function load($filename)
 {
     $_ = array();
     $file = DIR_LANGUAGE . $this->default . '/' . $filename . '.php';
     if (file_exists($file)) {
         require VQMod::modCheck($file);
     }
     $file = DIR_LANGUAGE . $this->directory . '/' . $filename . '.php';
     if (file_exists($file)) {
         require VQMod::modCheck($file);
     }
     $this->data = array_merge($this->data, $_);
     return $this->data;
 }
开发者ID:honeynatividad,项目名称:mircatu,代码行数:14,代码来源:vq2-system_library_language.php


示例16: fetch

 public function fetch($filename)
 {
     $file = DIR_TEMPLATE . $filename;
     if (file_exists($file)) {
         extract($this->data);
         ob_start();
         include VQMod::modCheck($file);
         $content = ob_get_clean();
         return $content;
     } else {
         trigger_error('Error: Could not load template ' . $file . '!');
         exit;
     }
 }
开发者ID:kashifnasim,项目名称:nexexcel,代码行数:14,代码来源:vq2-system_library_template.php


示例17: set

 public function set($key, $value)
 {
     $this->delete($key);
     require_once VQMod::modCheck(DIR_SYSTEM . 'nitro/config.php');
     require_once VQMod::modCheck(DIR_SYSTEM . 'nitro/core/core.php');
     $nitroPersistence = getNitroPersistence();
     if (!empty($nitroPersistence['Nitro']['Enabled']) && $nitroPersistence['Nitro']['Enabled'] == 'yes' && (empty($nitroPersistence['Nitro']['OpenCartCache']['Enabled']) || $nitroPersistence['Nitro']['OpenCartCache']['Enabled'] == 'no')) {
         return;
     }
     $nitro_expire = !empty($nitroPersistence['Nitro']['OpenCartCache']['ExpireTime']) ? (int) $nitroPersistence['Nitro']['OpenCartCache']['ExpireTime'] : 0;
     $this->expire = $nitro_expire;
     $file = DIR_CACHE . 'cache.' . preg_replace('/[^A-Z0-9\\._-]/i', '', $key) . '.' . (time() + $this->expire);
     $handle = fopen($file, 'w');
     fwrite($handle, serialize($value));
     fclose($handle);
 }
开发者ID:BulatSa,项目名称:Ctex,代码行数:16,代码来源:vq2-system_library_cache.php


示例18: render

 protected function render()
 {
     foreach ($this->children as $child) {
         $this->data[basename($child)] = $this->getChild($child);
     }
     if (file_exists(DIR_TEMPLATE . $this->template)) {
         extract($this->data);
         ob_start();
         require VQMod::modCheck(DIR_TEMPLATE . $this->template);
         $this->output = ob_get_contents();
         ob_end_clean();
         return $this->output;
     } else {
         trigger_error('Error: Could not load template ' . DIR_TEMPLATE . $this->template . '!');
         exit;
     }
 }
开发者ID:bizfindyou,项目名称:web,代码行数:17,代码来源:vq2-system_engine_controller.php


示例19: execute

 public function execute($registry)
 {
     // Stop any magical methods being called
     if (substr($this->method, 0, 2) == '__') {
         return false;
     }
     if (is_file($this->file)) {
         include_once VQMod::modCheck($this->file);
         $class = $this->class;
         $controller = new $class($registry);
         if (is_callable(array($controller, $this->method))) {
             return call_user_func(array($controller, $this->method), $this->args);
         } else {
             return false;
         }
     } else {
         return false;
     }
 }
开发者ID:MikeChipshop,项目名称:PP,代码行数:19,代码来源:vq2-system_engine_action.php


示例20: load

 public function load($filename)
 {
     $file = DIR_LANGUAGE . $this->directory . '/' . $filename . '.php';
     if (file_exists($file)) {
         $_ = array();
         require VQMod::modCheck($file);
         $this->data = array_merge($this->data, $_);
         return $this->data;
     }
     $file = DIR_LANGUAGE . $this->default . '/' . $filename . '.php';
     if (file_exists($file)) {
         $_ = array();
         require VQMod::modCheck($file);
         $this->data = array_merge($this->data, $_);
         return $this->data;
     } else {
         trigger_error('Error: Could not load language ' . $filename . '!');
         //	exit();
     }
 }
开发者ID:alexkaufman06,项目名称:siteassets,代码行数:20,代码来源:vq2-system_library_language.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP VTCacheUtils类代码示例发布时间:2022-05-23
下一篇:
PHP VP_View类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap