Overview

Abstract page-controller class.

Expects a directory structure similar to the following ...

Vendor/              # your vendor namespace
  App/               # subdirectory for page-controllers
    Example.php      # an example app
    Example/
      Layout/        # layout files to override shared layouts
        ...
      Locale/        # locale files
        en_US.php
        pt_BR.php
      Public/        # public assets
        style.css    
        script.js    
        image.jpg    
      View/          # view scripts
        _item.php    # partial template
        list.php     # full template
        edit.php     # another full template

When you call fetch(), these intercept methods are run in the following order ...

  1. _load() to load class properties from the fetch() URI specification

  2. _preRun() before the first action

  3. _preAction() before each action (including _forward()-ed actions)

  4. ... The action method itself runs here ...

  5. _postAction() after each action

  6. _postRun() after the last action, and before rendering

  7. _render() to render the view and layout; this in its turn calls _setViewObject() and _renderView() for the view, then _setLayoutTemplates() and _renderLayout() for the layout.

Package

This class is part of the Solar_Controller package.

Inheritance:

Configuration Keys

None.

Constants

None.

Public Properties

The Solar_Controller_Page class has no public properties; try the list of all properties.

Public Methods

These are all the public methods in the Solar_Controller_Page class.

You can also view the list of all public, protected, and private methods.

__construct()

Constructor.

__destruct()

Default destructor; does nothing other than provide a safe fallback for calls to parent::__destruct().

__get()

Try to force users to define what their view variables are.

__set()

Try to force users to define what their view variables are.

actionError()

Shows application errors.

display()

Executes the requested action and displays its output.

dump()

Convenience method for getting a dump the whole object, or one of its properties, or an external variable.

fetch()

Executes the requested action and returns its output with layout.

locale()

Looks up class-specific locale strings based on a key.

setController()

Sets the name for this page-controller; generally used only by the front-controller when static routing leads to this page.

setFrontController()

Injects the front-controller object that invoked this page-controller.



Local