Example #1
0
 public function __call($method, $params)
 {
     switch (true) {
         # Checking status: $paramsost->is_pending();
         case strpos($method, 'is_') === 0:
             $status = str_replace('is_', '', $method);
             return $this->status == $status;
         default:
             return parent::__call($method, $params);
     }
 }
Example #2
0
 public function __call($method, $params)
 {
     if (strpos($method, 'is_post_')) {
         return $this->_parse_is_post_level_or($method);
     } elseif (strpos($method, 'is_') === 0) {
         if (is_int(strpos($method, '_or_'))) {
             return $this->parse_is_level_or($method);
         } else {
             return $this->parse_is_level($method);
         }
     }
     parent::__call($method, $params);
 }