Exemple #1
0
 /**
  * Searches a repository to see if it behave as.
  *
  * If a method has the form of is[Behavior Name] it check if the repository behave
  *
  * @param string $method The mising method
  * @param array  $args   Method arguments
  *
  * @return bool|mixed
  */
 public function __call($method, $args)
 {
     // If the method is of the form is[Bahavior] handle it.
     $parts = KInflector::explode($method);
     if ($parts[0] == 'is' && isset($parts[1])) {
         if ($this->hasBehavior(strtolower($parts[1]))) {
             return true;
         }
         return false;
     }
     return parent::__call($method, $args);
 }