yii\base\Object::hasMethod PHP Method

hasMethod() public method

The default implementation is a call to php function method_exists(). You may override this method when you implemented the php magic method __call().
public hasMethod ( string $name ) : boolean
$name string the method name
return boolean whether the method is defined
    public function hasMethod($name)
    {
        return method_exists($this, $name);
    }