class MethodCallable

Hierarchy

Expanded class hierarchy of MethodCallable

File

core/tests/Drupal/Tests/Core/Utility/CallableResolverTest.php, line 240

Namespace

Drupal\Tests\Core\Utility
View source
class MethodCallable {
    
    /**
     * A test __invoke method.
     *
     * @param string $suffix
     *   A suffix to append.
     *
     * @return string
     *   A test string.
     */
    public function __invoke($suffix) {
        return __METHOD__ . '+' . $suffix;
    }
    
    /**
     * A test method that returns "foo".
     *
     * @param string $suffix
     *   A suffix to append.
     *
     * @return string
     *   A test string.
     *
     * @throws \Exception
     *   Throws an exception when called statically.
     */
    public function method($suffix) {
        return __METHOD__ . '+' . $suffix;
    }

}

Members

Title Sort descending Modifiers Object type Summary
MethodCallable::method public function A test method that returns "foo".
MethodCallable::__invoke public function A test __invoke method.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.