src/PropertyAccessible.php
final public function hasMethod($method)
    {
        if (!Str::is($method)
            || !Str::match($method, "/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/")
        ) {
            throw new \InvalidArgumentException(
                "The \$method parameter must be a string and follow the PHP rules of method naming."
            );
        }

        return method_exists($this, $method);
    }
final public function hasMethod($method)
    {
        if (!Str::is($method)
            || !Str::match($method, "/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/")
        ) {
            throw new \InvalidArgumentException(
                "The \$method parameter must be a string and follow the PHP rules of method naming."
            );
        }

        return method_exists($this, $method);
    }
final public function hasMethod ( $ method ) { if ( ! Str :: is ( $ method ) || ! Str :: match ( $ method , "/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/" ) ) { throw new \ InvalidArgumentException ( "The \$method parameter must be a string and follow the PHP rules of method naming." ) ; } return method_exists ( $ this , $ method ) ; }
Checks if the object has the given method.

@param string $method The method to check.

@return bool Returns true if the property exists, false otherwise.

@see http://docs.php.net/manual/en/function.user-defined.php
@throws \InvalidArgumentException
Checks if the object has the given method .