• Illuminate\Routing\Controller

This is the master controller for all front-end pages. All requests that have not been picked up already by the router will end up here, then the URL is passed to the front-end controller for processing.

See also:

Public properties

public array $implement

Behaviors implemented by this controller.

Protected properties

protected array $extensionData

extensionData contains class reflection information, including behaviors

protected static array $extendableCallbacks

Used to extend the constructor of an extendable class. Eg:

Class::extend(function($obj) { })

protected static array $extendableStaticMethods

Collection of static methods used by behaviors.

protected static bool $extendableGuardProperties

Indicates if dynamic properties can be created.

Show inherited protected properties

Inherited protected properties

  • protected array $middleware - defined in Illuminate\Routing\Controller. The middleware registered on the controller.

Public methods

public void __construct()

Instantiate a new CmsController instance.

public void addDynamicMethod(string $dynamicName, callable $method, string $extension=NULL)

Programmatically adds a method to the extendable class

  • string $dynamicName
  • callable $method
  • string $extension

public void addDynamicProperty(string $dynamicName, string $value=NULL)

Programmatically adds a property to the extendable class

  • string $dynamicName
  • string $value

public mixed asExtension(string $shortName)

Short hand for getClassExtension() method, except takes the short extension name, example:

  • string $shortName

public static void clearExtendedClasses()

Clear the list of extended classes so they will be re-extended.

public static void extend(Closure $callback)

Extend this object properties upon construction.

  • Closure $callback

public void extendClassWith(string $extensionName)

Dynamically extend a class with a specified behavior

  • string $extensionName

public mixed extendableCall(string $name, array $params=NULL)

Magic method for __call()

  • string $name
  • array $params

public static mixed extendableCallStatic(string $name, array $params=NULL)

Magic method for __callStatic()

  • string $name
  • array $params

public void extendableConstruct()

extendableConstruct should be called as part of the constructor

public static void extendableExtendCallback(callable $callback)

extendableExtendCallback is a helper method for ::extend() static method

  • callable $callback

public string extendableGet(string $name)

Magic method for __get()

  • string $name

public string extendableSet(string $name, string $value)

Magic method for __set()

  • string $name
  • string $value

public mixed getClassExtension(string $name)

Returns a behavior object from an extendable class, example:

  • string $name - Fully qualified behavior name

public array getClassMethods()

Get a list of class methods, extension equivalent of get_class_methods()

public array getDynamicProperties()

Returns all dynamic properties and their values

public boolean isClassExtendedWith(string $name)

Check if extendable class is extended with a behavior object

  • string $name - Fully qualified behavior name

public boolean methodExists(string $name)

Checks if a method exists, extension equivalent of method_exists()

  • string $name

public boolean propertyExists(string $name)

Checks if a property exists, extension equivalent of property_exists()

  • string $name

public string run(string $url='/')

Finds and serves the request using the primary controller.

  • string $url - Specifies the requested page URL. If the parameter is omitted, the current URL used.

Show inherited public methods

Inherited public methods

  • public mixed __call(string $method, array $parameters) - defined in Illuminate\Routing\Controller. Handle calls to missing methods on the controller.
  • public Symfony\Component\HttpFoundation\Response callAction(string $method, array $parameters) - defined in Illuminate\Routing\Controller. Execute an action on the controller.
  • public array getMiddleware() - defined in Illuminate\Routing\Controller. Get the middleware assigned to the controller.
  • public Illuminate\Routing\ControllerMiddlewareOptions middleware(Closure|array|string $middleware, array $options=array()) - defined in Illuminate\Routing\Controller. Register middleware on the controller.

Protected methods

protected boolean extendableIsAccessible(mixed $class, string $propertyName)

Checks if a property is accessible, property equivalent of is_callable()

  • mixed $class
  • string $propertyName

protected void extensionExtractMethods(string $extensionName, object $extensionObject)

Extracts the available methods from a behavior and adds it to the list of callable methods.

  • string $extensionName
  • object $extensionObject