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


PHP _root类代码示例

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


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

示例1: generate

 private function generate($sTable, $tField)
 {
     $ret = "\n";
     $sXmlStructure = '<?xml version="1.0" encoding="UTF-8"?>' . $ret;
     $sXmlStructure .= '<structure>' . $ret;
     $sXmlStructure .= '<colonne primaire="true">id</colonne>' . $ret;
     foreach ($tField as $sField) {
         if (trim($sField) == '') {
             continue;
         }
         $sXmlStructure .= '<colonne>' . trim($sField) . '</colonne>' . $ret;
     }
     $sXmlStructure .= '</structure>' . $ret;
     $sXmlMax = '<?xml version="1.0" encoding="ISO-8859-1"?>' . $ret;
     $sXmlMax .= '<main>' . $ret;
     $sXmlMax .= '<max><![CDATA[1]]></max>' . $ret;
     $sXmlMax .= '</main>' . $ret;
     $sPath = _root::getConfigVar('path.generation') . _root::getParam('id') . '/data/xml/base/' . $sTable . '/';
     $oFile = new _file($sPath . 'structure.xml');
     $oFile->setContent($sXmlStructure);
     $oFile->save();
     $sPath = _root::getConfigVar('path.generation') . _root::getParam('id') . '/data/xml/base/' . $sTable . '/';
     $oFile = new _file($sPath . 'max.xml');
     $oFile->setContent($sXmlMax);
     $oFile->save();
 }
开发者ID:CariteColas,项目名称:projetTKB,代码行数:26,代码来源:main.php

示例2: __construct

 /**
  * constructeur
  * @access public
  * @param array tableau a verifier ($_POST,tableau de la row...)
  */
 public function __construct($tPost)
 {
     $this->tPost = $tPost;
     $sClass = _root::getConfigVar('check.class', 'plugin_check');
     $this->oCheck = new $sClass();
     $this->bCheck = true;
 }
开发者ID:DavBfr,项目名称:BlogMVC,代码行数:12,代码来源:plugin_valid.php

示例3: _showXml

 public function _showXml()
 {
     $oAuteur = model_auteur::getInstance()->findById(_root::getParam('id'));
     $oXml = new plugin_xmlObject($oAuteur);
     $oXml->setListColumn(array('id', 'nom', 'prenom'));
     $oXml->show();
 }
开发者ID:clavat,项目名称:mkframework,代码行数:7,代码来源:main.php

示例4: regenerateIndexXml

 public function regenerateIndexXml($sConfig, $sTable, $sIndex)
 {
     //$sConfig='xml';
     if (_root::getConfigVar('db.' . $sConfig . '.sgbd') == 'xml') {
         if (!file_exists(_root::getConfigVar('db.' . $sConfig . '.database'))) {
             $sBuilderDbPath = _root::getConfigVar('path.data') . 'genere/' . _root::getParam('id') . '/public/' . _root::getConfigVar('db.' . $sConfig . '.database');
             if (file_exists($sBuilderDbPath)) {
                 _root::setConfigVar('db.' . $sConfig . '.database', $sBuilderDbPath);
             } else {
                 throw new Exception('Base inexistante ' . _root::getConfigVar('db.' . $sConfig . '.database') . ' ni ' . $sBuilderDbPath);
             }
         }
     } else {
         if (_root::getConfigVar('db.' . $sConfig . '.sgbd') == 'csv') {
             if (!file_exists(_root::getConfigVar('db.' . $sConfig . '.database'))) {
                 $sBuilderDbPath = _root::getConfigVar('path.data') . 'genere/' . _root::getParam('id') . '/public/' . _root::getConfigVar('db.' . $sConfig . '.database');
                 if (file_exists($sBuilderDbPath)) {
                     _root::setConfigVar('db.' . $sConfig . '.database', $sBuilderDbPath);
                 } else {
                     throw new Exception('Base inexistante ' . _root::getConfigVar('db.' . $sConfig . '.database') . ' ni ' . $sBuilderDbPath);
                 }
             }
         }
     }
     $oModelFactory = new model_mkfbuilderfactory();
     $oModelFactory->setConfig($sConfig);
     return $oModelFactory->getSgbd()->generateIndexForTable($sTable, $sIndex);
 }
开发者ID:clavat,项目名称:mkMarket,代码行数:28,代码来源:main.php

示例5: _index

 public function _index()
 {
     $msg = '';
     $detail = '';
     if ($this->isPost()) {
         $sModule = _root::getParam('module');
         $sActions = _root::getParam('actions');
         $tAction = explode("\n", $sActions);
         if ($this->projectMkdir('module/' . $sModule) == true) {
             $detail = trR('creationRepertoire', array('#REPERTOIRE#' => 'module/' . $sModule));
         } else {
             $detail = trR('repertoireDejaExistant', array('#REPERTOIRE#' => 'module/' . $sModule));
         }
         if ($this->projectMkdir('module/' . $sModule . '/view') == true) {
             $detail .= '<br />' . trR('creationRepertoire', array('#REPERTOIRE#' => 'module/' . $sModule . '/view'));
         } else {
             $detail .= '<br />' . trR('repertoireDejaExistant', array('#REPERTOIRE#' => 'module/' . $sModule . '/view'));
         }
         $this->genModuleMain($sModule, $tAction);
         $msg = trR('moduleGenereAvecSucces', array('#MODULE#' => $sModule, '#listACTION#' => implode(',', $tAction)));
         $detail .= '<br />' . trR('CreationDuFichierVAR', array('#FICHIER#' => 'module/' . $sModule . '/main.php'));
         foreach ($tAction as $sAction) {
             $detail .= '<br />' . trR('CreationDuFichierVAR', array('#FICHIER#' => 'module/' . $sModule . '/view/' . $sAction . '.php'));
         }
         $detail .= '<br />' . tr('accessibleVia');
         foreach ($tAction as $sAction) {
             $detail .= '<br />- <a href="data/genere/' . _root::getParam('id') . '/public/index.php?:nav=' . $sModule . '::' . $sAction . '">index.php?:nav=' . $sModule . '::' . $sAction . '</a>';
         }
     }
     $oTpl = $this->getView('index');
     $oTpl->msg = $msg;
     $oTpl->detail = $detail;
     return $oTpl;
 }
开发者ID:clavat,项目名称:mkMarket,代码行数:34,代码来源:main.php

示例6: __construct

 /** 
  * constructeur
  * @access public
  * @param string $sToken
  */
 public function __construct()
 {
     $this->sSalt = 'fdsfA34T679hjfdsAfef';
     $this->iLifetime = _root::getConfigVar('security.xsrf.timeout.lifetime');
     $this->bUseSession = _root::getConfigVar('security.xsrf.session.enabled', 0);
     $this->sSessionVar = 'xsrfTokenArray';
 }
开发者ID:DavBfr,项目名称:BlogMVC,代码行数:12,代码来源:plugin_xsrf.php

示例7: getImg

 /** 
  * retourne le code html d'une image
  * @access public
  * @param string $sSrc path de l'image, par defaut utilisera le path.img configure dans conf/site.php
  * @param string $sAlt texte alternatif
  * @param array $tOption tableau contenant autant d'options a ajouter 
  * 						array('style'=>'border:1px')  >> <img style="border:1px"...
  * @return string retourne le code html de l'image
  */
 public function getImg($sSrc, $sAlt = null, $tOption = null)
 {
     if ($sAlt == null) {
         $sAlt = $sSrc;
     }
     $sOptions = $this->getOptionFromTab($tOption);
     return '<img src="' . _root::getConfigVar('path.img') . $sSrc . '" title="' . $sAlt . '" ' . $sOptions . '/>';
 }
开发者ID:clavat,项目名称:mkMarket,代码行数:17,代码来源:plugin_html.php

示例8: load

 private function load($sId)
 {
     if ($this->_toFile and isset($this->_toFile[$sId])) {
         return;
     }
     $oFile = new _file(_root::getConfigVar('path.cache') . $sId . '.cachevar');
     $this->_toFile[$sId] = $oFile;
 }
开发者ID:clavat,项目名称:mkframework,代码行数:8,代码来源:class_cacheVar.php

示例9: _show

 public function _show()
 {
     $oExamplemodel = model_examplemodel::getInstance()->findById(_root::getParam('id'));
     $oView = new _view('examplemodule::show');
     $oView->oExamplemodel = $oExamplemodel;
     //icishow
     $this->oLayout->add('main', $oView);
 }
开发者ID:CariteColas,项目名称:projetTKB,代码行数:8,代码来源:main.php

示例10: load

 /** 
  * charge le fichier de langue situe dans la section [path], valeur de i18n
  * @access public static
  * @param string $sLang (doit etre present dans le fichier de config [language] allow separer par des virgules
  */
 public static function load($sLang)
 {
     $tAllowed = preg_split('/,/', _root::getConfigVar('language.allow'));
     if (!in_array($sLang, $tAllowed) and $sLang != _root::getConfigVar('language.default')) {
         throw new Exception('Lang not allowed, list allow:' . _root::getConfigVar('language.allow'));
     }
     include_once _root::getConfigVar('path.i18n') . $sLang . '.php';
     self::$tLangue = _root::getConfigVar('tLangue');
 }
开发者ID:CariteColas,项目名称:projetTKB,代码行数:14,代码来源:plugin_i18n.php

示例11: _projetEmbedded

 public function _projetEmbedded()
 {
     if (_root::getParam('action') == 'model') {
         $tLink = array();
     } else {
         //if(_root::getParam('action')=='module'){
         $tLink = array('Modules' => 'title', 'Cr&eacute;er un module' => 'module', 'Cr&eacute;er un module CRUD' => 'crud', 'Cr&eacute;er un module Lecture seule' => 'crudreadonly', 'Cr&eacute;er un module d\'authentification' => 'authmodule', 'Cr&eacute;er un module d\'authentification avec inscription' => 'authwithinscriptionmodule', 'Modules int&eacute;grable' => 'title', 'Cr&eacute;er un module menu ' => 'addmodulemenu', 'Cr&eacute;er un module int&eacute;grable' => 'moduleembedded', 'Cr&eacute;er un module CRUD int&eacute;grable' => 'crudembedded', 'Cr&eacute;er un module Lecture seule int&eacute;grable' => 'crudembeddedreadonly');
     }
     $oTpl = new _tpl('menu::projetEmbedded');
     $oTpl->tLink = $tLink;
     return $oTpl;
 }
开发者ID:CariteColas,项目名称:projetTKB,代码行数:12,代码来源:main.php

示例12: _index

 public function _index()
 {
     $tLink = array('Articles' => 'article::list', 'Articles pagine' => 'article::listPagination', 'Articles via module table' => 'article::listModuleTable', 'Utiliser des classes metiers' => 'article::myclass', 'Appeler des sous module' => 'private_article::list', 'Graphiques' => 'chart::examples', 'Graphiques SVG' => 'chart::examplesSVG', 'Google Map' => 'default::googleMap', 'Auteurs xml' => 'auteurxml::list', 'Products "virtuel"' => 'virtualProducts::list', 'Prive' => 'prive::list');
     if (_root::getACL()->can('edit', 'acl')) {
         $tLink['Manage accounts'] = 'account::list';
         $tLink['Manage groups'] = 'group::list';
         $tLink['Manage permission'] = 'permission::list';
     }
     $oView = new _view('menu::index');
     $oView->tLink = $tLink;
     return $oView;
 }
开发者ID:clavat,项目名称:mkframework,代码行数:12,代码来源:main.php

示例13: _list

 public function _list()
 {
     //cache
     if (_root::getCache()->isCached('sidebar_categories')) {
         $oView = _root::getCache()->getCached('sidebar_categories');
         return $oView;
     }
     $tCategories = model_categories::getInstance()->findAll();
     $oView = new _view('categories::list');
     $oView->tCategories = $tCategories;
     _root::getCache()->setCache('sidebar_categories', $oView);
     return $oView;
 }
开发者ID:EhteshamMehmood,项目名称:BlogMVC,代码行数:13,代码来源:main.php

示例14: _category

 public function _category()
 {
     $oView = new _view('default::index');
     $this->oLayout->add('main', $oView);
     //posts (main)
     $oModuleExamplemodule = new module_posts();
     $oModuleExamplemodule->setCategory(_root::getParam('id'));
     //si vous souhaitez indiquer au module integrable des informations sur le module parent
     $oModuleExamplemodule->setRootLink('default::categoryDetail', array('id' => _root::getParam('id')));
     //recupere la vue du module
     $oViewModule = $oModuleExamplemodule->_index();
     //assigner la vue retournee a votre layout
     $this->oLayout->add('main', $oViewModule);
 }
开发者ID:EhteshamMehmood,项目名称:BlogMVC,代码行数:14,代码来源:main.php

示例15: _connect

 /**
  * @access public
  */
 public function _connect()
 {
     //on regenere un nouvel id de session
     session_regenerate_id(true);
     $this->_bConnected = true;
     $_SESSION['ip'] = sha1($_SERVER['REMOTE_ADDR']);
     if (isset($_SERVER['HTTP_USER_AGENT'])) {
         $_SESSION['userAgent'] = sha1($_SERVER['HTTP_USER_AGENT']);
     } else {
         $_SESSION['userAgent'] = sha1('noUserAgent');
     }
     if ((int) _root::getConfigVar('auth.session.timeout.enabled') == 1) {
         $_SESSION['timeout'] = time() + (int) _root::getConfigVar('auth.session.timeout.lifetime');
     }
 }
开发者ID:CariteColas,项目名称:projetTKB,代码行数:18,代码来源:abstract_auth.php


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