本文整理汇总了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'));
}
}
}
示例2: __construct
public function __construct()
{
parent::__construct();
if (empty($this->date)) {
$this->date = today();
}
}
示例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;
}
}
示例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;
}
}
示例5: __construct
public function __construct()
{
parent::__construct();
$this->table = "Pays";
}
示例6: __construct
/**
* Constructor
*/
public function __construct()
{
//$this->idsecretaire = new \Doctrine\Common\Collections\ArrayCollection();
$this->idsecretaire = array();
parent::__construct();
$this->table = "Cadre";
}
示例7: __construct
public function __construct()
{
parent::__construct();
$this->map = self::map();
}
示例8: __construct
public function __construct()
{
parent::__construct();
$this->setTabela('usuarios');
}