当前位置: 首页>>代码示例>>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;未经允许,请勿转载。