當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Zend_Filter_Input::__get方法代碼示例

本文整理匯總了PHP中Zend_Filter_Input::__get方法的典型用法代碼示例。如果您正苦於以下問題:PHP Zend_Filter_Input::__get方法的具體用法?PHP Zend_Filter_Input::__get怎麽用?PHP Zend_Filter_Input::__get使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Zend_Filter_Input的用法示例。


在下文中一共展示了Zend_Filter_Input::__get方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: montaBuscaData

 public static function montaBuscaData(Zend_Filter_Input $post, $tpBuscaData, $cmpData, $cmpBD, $cmpDataFinal = null, array $arrayJoin = null)
 {
     $arrBusca = array();
     $aux1 = $post->__get($cmpData);
     $aux2 = $post->__get($tpBuscaData);
     if (!empty($aux1) || $aux2 != '') {
         if ($post->__get($tpBuscaData) == "igual") {
             $arrBusca["{$cmpBD} >= ?"] = ConverteData($post->__get($cmpData), 13) . " 00:00:00";
             $arrBusca["{$cmpBD} <= ?"] = ConverteData($post->__get($cmpData), 13) . " 23:59:59";
         } elseif ($post->__get($tpBuscaData) == "maior") {
             $arrBusca["{$cmpBD} >= ?"] = ConverteData($post->__get($cmpData), 13) . " 00:00:00";
         } elseif ($post->__get($tpBuscaData) == "menor") {
             $arrBusca["{$cmpBD} <= ?"] = ConverteData($post->__get($cmpData), 13) . " 00:00:00";
         } elseif ($post->__get($tpBuscaData) == "entre") {
             $arrBusca["{$cmpBD} >= ?"] = ConverteData($post->__get($cmpData), 13) . " 00:00:00";
             $arrBusca["{$cmpBD} <= ?"] = ConverteData($post->__get($cmpDataFinal), 13) . " 23:59:59";
         } elseif ($post->__get($tpBuscaData) == "OT") {
             $arrBusca["{$cmpBD} = ?"] = date("Y-m-d", strtotime("-1 day")) . " 00:00:00";
         } elseif ($post->__get($tpBuscaData) == "U7") {
             $arrBusca["{$cmpBD} > ?"] = date("Y-m-d", strtotime("-7 day")) . " 00:00:00";
             $arrBusca["{$cmpBD} < ?"] = date("Y-m-d") . " 23:59:59";
         } elseif ($post->__get($tpBuscaData) == "SP") {
             /*$arrBusca["{$cmpBD} > ?"] = date("Y-m-").(date("d")-7)." 00:00:00";
               $arrBusca["{$cmpBD} < ?"] = date("Y-m-d")." 23:59:59";*/
             $dia_semana = date('w');
             $primeiro_dia = date('Y-m-d', strtotime("-" . $dia_semana . "day"));
             $domingo = date('Y-m-d', strtotime($primeiro_dia . "-1 week"));
             $sabado = date('Y-m-d', strtotime($domingo . "6 day"));
             $arrBusca["{$cmpBD} >= ?"] = $domingo . " 00:00:00";
             $arrBusca["{$cmpBD} <= ?"] = $sabado . " 23:59:59";
         } elseif ($post->__get($tpBuscaData) == "MM") {
             $arrBusca["{$cmpBD} > ?"] = date("Y-m-01") . " 00:00:00";
             $arrBusca["{$cmpBD} < ?"] = date("Y-m-d") . " 23:59:59";
         } elseif ($post->__get($tpBuscaData) == "UM") {
             $arrBusca["{$cmpBD} >= ?"] = date("Y-m", strtotime("-1 month")) . "-01 00:00:00";
             //$arrBusca["{$cmpBD} <= ?"] = date("d/m/Y", mktime(0, 0, 0, date("m",  strtotime("-1 month"))+1, 0, date("Y")));
             $arrBusca["{$cmpBD} <= ?"] = date("Y-m-d", mktime(0, 0, 0, date("m", strtotime("-1 month")) + 1, 0, date("Y")));
         } elseif ($post->__get($tpBuscaData) == "") {
         } else {
             $arrBusca["{$cmpBD} > ?"] = ConverteData($post->__get($cmpData), 13) . " 00:00:00";
             if ($post->__get($cmpDataFinal) != "") {
                 $arrBusca["{$cmpBD} < ?"] = ConverteData($post->__get($cmpDataFinal), 13) . " 23:59:59";
             }
         }
     }
     if (!empty($arrayJoin)) {
         $arrBusca = array_merge($arrayJoin, $arrBusca);
     }
     return $arrBusca;
 }
開發者ID:hackultura,項目名稱:novosalic,代碼行數:50,代碼來源:GenericControllerNew.php


注:本文中的Zend_Filter_Input::__get方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。