hasMethod() public method

A method is defined if: - the class has a method with the specified name - an attached behavior has a method with the given name (when $checkBehaviors is true).
public hasMethod ( string $name, boolean $checkBehaviors = true ) : boolean
$name string the property name
$checkBehaviors boolean whether to treat behaviors' methods as methods of this component
return boolean whether the property is defined
Ejemplo n.º 1
0
 /**
  * @inheritdoc
  */
 public function hasMethod($name, $checkBehaviors = true)
 {
     if (method_exists($this->obj, $name)) {
         return true;
     }
     return parent::hasMethod($name, $checkBehaviors);
 }