Пример #1
0
 public function __call($method, $args)
 {
     if (strpos($method, '_in')) {
         $method = strtr($method, array('_in' => ''));
         echo '<div class="form-group">' . "\n";
         if ($method == 'textField') {
             echo $this->label($args[0], $args[1], array('class' => 'sr-only'));
             if (!isset($args[2])) {
                 $args[2] = array();
             }
             $args[2]['class'] = empty($args[2]['class']) ? 'form-control' : $args[2]['class'] . ' form-control';
         }
         echo call_user_func_array(array($this, $method), $args);
         echo "\n</div>\n";
     } else {
         return parent::__call($method, $args);
     }
 }