Ferreteria/v2/usage/pages: Difference between revisions

From Woozle Writes Code
< Ferreteria‎ | v2‎ | usage
Jump to navigation Jump to search
(pages do not like thistles or hunny)
(a bit more info)
Line 4: Line 4:
An application will generally create their own page class descended from one of these classes, depending on what functionality it wants.
An application will generally create their own page class descended from one of these classes, depending on what functionality it wants.


Pages do not do URL translation; that is handled by {{l/same|menus}}.
When URL translation is needed from a Page object (e.g. ParsePath()), the object passes the request over to {{l/same|menus}}.
==Files==
==Files==
* {{ferreteria/code|page.php}}
* {{ferreteria/code|page.php}}
Line 11: Line 11:
** '''clsPageBasic''' (abstract) - handles exception-email generation
** '''clsPageBasic''' (abstract) - handles exception-email generation
*** '''clsPageLogin''' (abstract) - provides login forms (inheritor must call them, though) and admin menus
*** '''clsPageLogin''' (abstract) - provides login forms (inheritor must call them, though) and admin menus
==Process==
The basic sequence of page component creation as defined in clsPage is:
* $this->ParseInput();
* $this->HandleInput();
* $this->PreSkinBuild();
* $this->Skin()->Build();
*: // tell the skin to fill in its pieces
* $this->PostSkinBuild();
* $this->Skin()->DoPage();

Revision as of 21:27, 7 June 2015

About

Pages in Ferreteria handle execution of various processes to build a page, including form input handling and rendering of output.

An application will generally create their own page class descended from one of these classes, depending on what functionality it wants.

When URL translation is needed from a Page object (e.g. ParsePath()), the object passes the request over to menus.

Files

Classes

  • clsPage (abstract) - default page execution, stub for automatic email when exception thrown; app, skin, and data objects
    • clsPageBasic (abstract) - handles exception-email generation
      • clsPageLogin (abstract) - provides login forms (inheritor must call them, though) and admin menus

Process

The basic sequence of page component creation as defined in clsPage is:

  • $this->ParseInput();
  • $this->HandleInput();
  • $this->PreSkinBuild();
  • $this->Skin()->Build();
    // tell the skin to fill in its pieces
  • $this->PostSkinBuild();
  • $this->Skin()->DoPage();