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


PHP CRUD::__construct方法代码示例

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


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

示例1: __construct

 public function __construct($set, $map, $data)
 {
     parent::__construct();
     parent::rqst();
     $this->set = $set;
     $this->map = $map;
     $this->data = $data[0];
     if (isset($_POST['crud'])) {
         $validation = crud_validation($this->map);
         $post = $validation['post'];
         $error = $validation['error'];
         $this->data = array_merge($this->data, $post);
         if ($error) {
             foreach ($error as $e => $v) {
                 $this->map[$e]['error'] = $v;
             }
         } else {
             switch ($post['method']) {
                 case 'edit':
                     $data = array_intersect_key($post, array_flip($this->set['cols']));
                     $this->update($this->set['tbl'], $data, $this->set['actionID'] . '=' . $post[$this->set['actionID']]);
                     break;
                     //                    case 'add':
                     //                        $this->update(REVIEWS_TABLE, $data, 'id=' . $data['id']);
                     //                        break;
             }
             $hook = $this->set['hook'];
             if ($hook) {
                 call_user_func($hook['func'], $this->data[$hook['param']]);
             }
             Redirect($this->build_url('delete'));
         }
     }
 }
开发者ID:gblok,项目名称:rsc,代码行数:34,代码来源:class.edt.php

示例2: __construct

 public function __construct()
 {
     parent::__construct();
     if (empty($this->date)) {
         $this->date = today();
     }
 }
开发者ID:vivek201,项目名称:canteen-mgmt,代码行数:7,代码来源:order.class.php

示例3: __construct

 public function __construct($lg = 'fr')
 {
     include BASE . 'config/locale.php';
     parent::__construct();
     $this->myLanguage = $lg;
     $defaultLg = 'en';
     $this->allLanguages = $this->getAllLanguages();
     $this->allLanguagesSession = $arrLangue;
     $lgTrad = $this->getLangueTradution();
     $infoWeb = $this->dbQS(1, '_website');
     $infoWebTraduction = $this->dbQS($lgTrad, '_website_traduction', 'langue');
     if (empty($infoWebTraduction)) {
         $infoWebTraductionTemp = $this->dbQS($defaultLg, '_website_traduction', 'langue');
         if (!empty($infoWebTraductionTemp)) {
             unset($infoWebTraductionTemp['id']);
             $infoWebTraductionTemp['langue'] = $lgTrad;
             $this->dbQI($infoWebTraductionTemp, '_website_traduction');
         }
     }
     $infoWebTraduction = $this->dbQS($lgTrad, '_website_traduction', 'langue');
     if (!empty($infoWeb) && !empty($infoWebTraduction)) {
         $this->configWeb = $infoWeb;
         $this->configWeb['oauth_google_active'] = $infoWeb['oauth_google_active'] === '1' ? true : false;
         $this->configWeb['oauth_facebook_active'] = $infoWeb['oauth_facebook_active'] === '1' ? true : false;
         $this->configWeb['statut_tinymce'] = html_entity_decode($infoWebTraduction['statut_tinymce']);
         $this->configWeb['title'] = $infoWebTraduction['title'];
         $this->configWeb['slogan'] = $infoWebTraduction['slogan'];
         $this->configWeb['description'] = $infoWebTraduction['description'];
         $this->configWeb['copyright'] = $infoWebTraduction['copyright'];
         $this->configWeb['year'] = $infoWebTraduction['year'];
         $this->configWeb['keywords'] = $infoWebTraduction['keywords'];
         $this->configWeb['date_modification'] = $infoWebTraduction['date_modification'];
         $this->configWeb['langue_groupe'] = @unserialize($this->configWeb['langue_groupe']);
         if (!is_array($this->configWeb['langue_groupe'])) {
             $this->configWeb['langue_groupe'] = array();
         }
         foreach ($arrLangue as $k => $v) {
             if (!array_key_exists($k, $this->configWeb['langue_groupe']) && $infoWeb['langue_front'] !== $k) {
                 unset($arrLangue[$k]);
             }
         }
         $this->allLanguagesWebsite = $arrLangue;
     }
 }
开发者ID:neoartdoo,项目名称:CMS,代码行数:44,代码来源:Langue.php

示例4: __construct

 public function __construct($lg = 'fr')
 {
     $this->fileLocale = BASE . 'config/locale.php';
     include $this->fileLocale;
     $this->arrLangue = $arrLangue;
     $this->fileTemp = LANGUE . 'temp.lg.php';
     include $this->fileTemp;
     $this->wTranslate = $wTranslate;
     parent::__construct();
     $this->myLanguage = $lg;
     $fileLangue = LANGUE . $lg . '.lg.php';
     include $fileLangue;
     $this->_w = $_w;
     $defaultLg = 'en';
     $this->allLanguages = $this->getAllLanguages();
     $this->allLanguagesSession = $this->arrLangue;
     $lgTrad = $this->getLangueTradution();
     $infoWeb = $this->dbQS(Constant::$websiteId, '_website');
     $infoWebTraduction = $this->dbQS($lgTrad, '_website_traduction', 'langue');
     if (empty($infoWebTraduction)) {
         $infoWebTraductionTemp = $this->dbQS($defaultLg, '_website_traduction', 'langue');
         if (!empty($infoWebTraductionTemp)) {
             unset($infoWebTraductionTemp['id']);
             $infoWebTraductionTemp['langue'] = $lgTrad;
             $this->dbQI($infoWebTraductionTemp, '_website_traduction');
         }
     }
     $infoWebTraduction = $this->dbQS($lgTrad, '_website_traduction', 'langue');
     if (!empty($infoWeb) && !empty($infoWebTraduction)) {
         $this->configWeb = $infoWeb;
         $this->configWeb['oauth_google_active'] = $infoWeb['oauth_google_active'] === '1' ? true : false;
         $this->configWeb['oauth_facebook_active'] = $infoWeb['oauth_facebook_active'] === '1' ? true : false;
         $this->configWeb['statut_tinymce_edit'] = $this->_cleanPHP($infoWebTraduction['statut_tinymce']);
         $this->configWeb['privacy_tinymce_edit'] = $this->_cleanPHP($infoWebTraduction['privacy_tinymce']);
         $this->configWeb['signature_tinymce_edit'] = $this->_cleanPHP($infoWebTraduction['signature_tinymce']);
         $this->configWeb['cgu_tinymce_edit'] = $this->_cleanPHP($infoWebTraduction['cgu_tinymce']);
         $this->configWeb['terms_tinymce_edit'] = $this->_cleanPHP($infoWebTraduction['terms_tinymce']);
         $this->configWeb['privacy_tinymce'] = html_entity_decode($infoWebTraduction['privacy_tinymce']);
         $this->configWeb['statut_tinymce'] = html_entity_decode($infoWebTraduction['statut_tinymce']);
         $this->configWeb['terms_tinymce'] = html_entity_decode($infoWebTraduction['terms_tinymce']);
         $this->configWeb['signature_tinymce'] = html_entity_decode($infoWebTraduction['signature_tinymce']);
         $this->configWeb['cgu_tinymce'] = html_entity_decode($infoWebTraduction['cgu_tinymce']);
         // $this->configWeb['transfer_tinymce_edit']   =  $this->_cleanPHP($this->configWeb['transfer_tinymce']);
         // $this->configWeb['check_tinymce_edit']      =  $this->_cleanPHP($this->configWeb['check_tinymce']);
         // $this->configWeb['cash_tinymce_edit']       =  $this->_cleanPHP($this->configWeb['cash_tinymce']);
         // $this->configWeb['transfer_tinymce']        =  html_entity_decode($this->configWeb['transfer_tinymce']);
         // $this->configWeb['check_tinymce']           =  html_entity_decode($this->configWeb['check_tinymce']);
         // $this->configWeb['cash_tinymce']            =  html_entity_decode($this->configWeb['cash_tinymce']);
         $this->configWeb['title'] = $infoWebTraduction['title'];
         $this->configWeb['slogan'] = $infoWebTraduction['slogan'];
         $this->configWeb['description'] = $infoWebTraduction['description'];
         $this->configWeb['copyright'] = $infoWebTraduction['copyright'];
         $this->configWeb['year'] = $infoWebTraduction['year'];
         // $this->configWeb['currency']                =  $infoWebTraduction['currency'];
         $this->configWeb['keywords'] = $infoWebTraduction['keywords'];
         $this->configWeb['date_modification'] = $infoWebTraduction['date_modification'];
         // $this->configWeb['store_vat']               = $infoWebTraduction['store_vat'];
         // $this->configWeb['shipping_free_info']      = $infoWebTraduction['shipping_free_info'];
         // $this->configWeb['shipping_free_active']    = $infoWebTraduction['shipping_free_active'];
         // $this->configWeb['shipping_slow_info']      = $infoWebTraduction['shipping_slow_info'];
         // $this->configWeb['shipping_slow_amount']    = $infoWebTraduction['shipping_slow_amount'];
         // $this->configWeb['shipping_slow_active']    = $infoWebTraduction['shipping_slow_active'];
         // $this->configWeb['shipping_fast_info']      = $infoWebTraduction['shipping_fast_info'];
         // $this->configWeb['shipping_fast_amount']    = $infoWebTraduction['shipping_fast_amount'];
         // $this->configWeb['shipping_fast_active']    = $infoWebTraduction['shipping_fast_active'];
         $this->configWeb['langue_groupe'] = @unserialize($this->configWeb['langue_groupe']);
         $this->configWeb['addresses'] = @unserialize($this->configWeb['addresses']);
         if (!is_array($this->configWeb['langue_groupe'])) {
             $this->configWeb['langue_groupe'] = array();
         }
         foreach ($arrLangue as $k => $v) {
             if (!array_key_exists($k, $this->configWeb['langue_groupe']) && $infoWeb['langue_front'] !== $k) {
                 unset($arrLangue[$k]);
             }
         }
         $this->allLanguagesWebsite = $arrLangue;
     }
 }
开发者ID:doorgets,项目名称:cms,代码行数:78,代码来源:Langue.php

示例5: __construct

 public function __construct()
 {
     parent::__construct();
     $this->table = "Pays";
 }
开发者ID:ngnawejonas,项目名称:SecuDoc,代码行数:5,代码来源:Pays.php

示例6: __construct

 /**
  * Constructor
  */
 public function __construct()
 {
     //$this->idsecretaire = new \Doctrine\Common\Collections\ArrayCollection();
     $this->idsecretaire = array();
     parent::__construct();
     $this->table = "Cadre";
 }
开发者ID:ngnawejonas,项目名称:SecuDoc,代码行数:10,代码来源:Cadre.php

示例7: __construct

 public function __construct()
 {
     parent::__construct();
     $this->map = self::map();
 }
开发者ID:gblok,项目名称:rsc,代码行数:5,代码来源:class.rvs.php

示例8: __construct

 public function __construct()
 {
     parent::__construct();
     $this->setTabela('usuarios');
 }
开发者ID:DonDesigner,项目名称:galeriafotos,代码行数:5,代码来源:usuarios.class.php


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