示例#1
0
 protected function getDateTimeFilterRules()
 {
     $rules = array();
     foreach ($this->getTableSchema()->columns as $attribute => $column) {
         if (Helper::starts(strtolower($column->dbType), 'timestamp')) {
             $rules[] = [$attribute, 'filterDateTime'];
         } elseif (strtolower($column->dbType) == 'date') {
             $rules[] = [$attribute, 'filterDate'];
         } elseif (strtolower($column->dbType) == 'time') {
             $rules[] = [$attribute, 'filterTime'];
         }
     }
     return $rules;
 }