public static function methodExists($objectInstance, $method, $name)
    {
        Validate::canCastAsString($method, 'method');
        Validate::notNull($objectInstance, 'objectInstance');
        Validate::isObject($objectInstance, 'objectInstance');

        if (method_exists($objectInstance, $method)) {
            return true;
        } else {
            throw new \InvalidArgumentException(
                sprintf(
                    Resources::ERROR_METHOD_NOT_FOUND,
                    $method,
                    $name
                )
            );
        }
    }
public static function methodExists($objectInstance, $method, $name)
    {
        Validate::canCastAsString($method, 'method');
        Validate::notNull($objectInstance, 'objectInstance');
        Validate::isObject($objectInstance, 'objectInstance');

        if (method_exists($objectInstance, $method)) {
            return true;
        } else {
            throw new \InvalidArgumentException(
                sprintf(
                    Resources::ERROR_METHOD_NOT_FOUND,
                    $method,
                    $name
                )
            );
        }
    }
public static function methodExists ( $ objectInstance , $ method , $ name ) { Validate :: canCastAsString ( $ method , 'method' ) ; Validate :: notNull ( $ objectInstance , 'objectInstance' ) ; Validate :: isObject ( $ objectInstance , 'objectInstance' ) ; if ( method_exists ( $ objectInstance , $ method ) ) { return true ; } else { throw new \ InvalidArgumentException ( sprintf ( Resources :: ERROR_METHOD_NOT_FOUND , $ method , $ name ) ) ; } }
Validate if method exists in object

@param object $objectInstance An object that requires method existing
validation
@param string $method         Method name
@param string $name           The parameter name

@return boolean
Validate if method exists in object