Cms\Classes\CodeBase

Source: ~/modules/cms/classes/CodeBase.php

Extends:

Implements:

  • ArrayAccess

Parent class for PHP classes created for layout and page code sections.

Public properties

public Cms\Classes\Page $page

Specifies the current page

public Cms\Classes\Layout $layout

Specifies the current layout

public Cms\Classes\controller $controller

Specifies the CMS controller

Show inherited public properties

Inherited public properties

Protected properties

There are no protected properties in the class.

Show inherited protected properties

Inherited protected properties

Public methods

public mixed __call(string $method, array $parameters)

Dynamically handle calls into the controller instance.

Parameters
  • string $method
  • array $parameters

public void __construct(Cms\Classes\Page $page, Cms\Classes\Layout $layout, Cms\Classes\Controller $controller)

Creates the object instance.

Parameters

public void __get(string $name)

This object is referenced as $this->page in Cms\Classes\ComponentBase, so to avoid $this->page->page this method will proxy there. This is also used as a helper for accessing controller variables/components easier in the page code, eg. $this->foo instead of $this['foo']

Parameters
  • string $name

public void __isset(string $name)

This will check if a property isset on the CMS Page object.

Parameters
  • string $name

public void __set(string $name, mixed $value)

This will set a property on the CMS Page object.

Parameters
  • string $name
  • mixed $value

public void offsetExists($offset)

ArrayAccess implementation

Parameters
  • $offset

public void offsetGet($offset)

ArrayAccess implementation

Parameters
  • $offset

public void offsetSet($offset, $value)

ArrayAccess implementation

Parameters
  • $offset
  • $value

public void offsetUnset($offset)

ArrayAccess implementation

Parameters
  • $offset

public void onEnd()

This event is triggered in the end of the execution cycle, but before the page is displayed. The layout's onEnd method triggers after the page's onEnd method.

public void onInit()

This event is triggered when all components are initialized and before AJAX is handled. The layout's onInit method triggers before the page's onInit method.

public void onStart()

This event is triggered in the beginning of the execution cycle. The layout's onStart method triggers before the page's onStart method.

Show inherited public methods

Inherited public methods

Protected methods

Show inherited protected methods

Inherited protected methods

  • protected boolean extendableIsAccessible(mixed $class, string $propertyName) - defined in October\Rain\Extension\Extendable. Checks if a property is accessible, property equivalent of is_callabe().
  • protected void extensionExtractMethods(string $extensionName, object $extensionObject) - defined in October\Rain\Extension\Extendable. Extracts the available methods from a behavior and adds it to the.