Elastic
[ class tree: Elastic ] [ index: Elastic ] [ all elements ]

Class: Module

Source Location: /classes/module.php

Class Overview

Object
   |
   --Module

The basic unit of a theme.


Author(s):

  • Daryl Koopersmith

Variables

Methods


Child classes:

Content
A basic module with the id 'content'.
Group
Groups contain multiple modules, and render only those modules.
Header
A basic module with the id 'header'.
Sidebar
A module that registers a widgetized sidebar.

Inherited Methods


Class Details



[ Top ]


Class Variables

$classes =

[line 46]


Type:   mixed


[ Top ]

$id =

[line 44]


Type:   mixed


[ Top ]

$type =

[line 45]


Type:   mixed


[ Top ]



Class Methods


constructor __construct [line 55]

Module __construct( [string $id = NULL], [string $type = NULL])

Constructs a new Module.



Tags:

author:  Daryl Koopersmith


Overridden in child classes as:

Content::__construct()
Group::__construct()
Selection::__construct()
Header::__construct()
Sidebar::__construct()

Overrides Object::__construct() (parent method not documented)

Parameters:

string   $id   The id of the module. Must be a unique string.
string   $type   Optional. Default, the module's class (lowercase). The type of the module.

[ Top ]

method add_class [line 202]

void add_class( $class)

C L A S S E S A P I



Parameters:

   $class  

[ Top ]

method apply_atomic [line 161]

void apply_atomic( [string $suffix = ''], mixed $value)

An interface to elastic_apply_atomic() for an instance of a Module.



Tags:

author:  Daryl Koopersmith
see:  elastic_apply_atomic()


Parameters:

string   $suffix   A string appended to the end of the Module::$id.
mixed   $value   The value to be filtered.

[ Top ]

method apply_atomic_specific [line 183]

void apply_atomic_specific( [string $suffix = ''], mixed $value)

An interface to elastic_apply_atomic_specific() for an instance of a Module.



Tags:

author:  Daryl Koopersmith
see:  elastic_apply_atomic_specific()


Parameters:

string   $suffix   A string appended to the end of the Module::$id.
mixed   $value   The value to be filtered.

[ Top ]

method do_atomic [line 118]

void do_atomic( [string $suffix = ''])

An interface to elastic_do_atomic() for an instance of a Module.



Tags:

author:  Daryl Koopersmith
see:  elastic_do_atomic()


Parameters:

string   $suffix   A string appended to the end of the Module::$id.

[ Top ]

method do_atomic_specific [line 139]

void do_atomic_specific( [string $suffix = ''])

An interface to elastic_do_atomic_specific() for an instance of a Module.



Tags:

author:  Daryl Koopersmith
see:  elastic_do_atomic_specific()


Parameters:

string   $suffix   A string appended to the end of the Module::$id.

[ Top ]

method do_view [line 268]

string do_view( )

Returns the output of the most contextually-specific set view.



Tags:

author:  Daryl Koopersmith


[ Top ]

method format_hook [line 106]

void format_hook( [string $suffix = ""], [string $view = ""])

Formats a hook for this module.



Tags:

author:  Daryl Koopersmith


Parameters:

string   $view  
string   $suffix  

[ Top ]

method get_module [line 431]

Module get_module( string $id)

Get a module by id.



Tags:

author:  Daryl Koopersmith


Parameters:

string   $id  

[ Top ]

method get_modules [line 394]

mixed get_modules( string $slug, callback $condition, [string $return = 'array'])

Function that provides a framework for searching all modules based on a slug and a callback.



Tags:

return:  Return type based on $return value. An array of matched modules. If no matches found, false.
author:  Daryl Koopersmith


Parameters:

string   $slug   The value to retrieve.
callback   $condition   A function that compares the $slug and each Module.
string   $return   Optional. Default 'array'. If 'single', returns the first matched module. If 'selection', returns the matches in a new Selection.

[ Top ]

method get_modules_by_type [line 456]

void get_modules_by_type( string $type, [boolean $selection = false])

Get a module by type.



Tags:

author:  Daryl Koopersmith


Parameters:

string   $type  
boolean   $selection   Optional. Default false. If true, return matches in a new Selection.

[ Top ]

method has_class [line 206]

void has_class( $class)



Parameters:

   $class  

[ Top ]

method has_view [line 245]

void has_view( $view)



Parameters:

   $view  

[ Top ]

method load_default_views [line 302]

void load_default_views( )

Loads and sets default views



Tags:

author:  Daryl Koopersmith


[ Top ]

method load_views_folder [line 282]

void load_views_folder( string $folder)

Loads and sets views from a folder.

File for global view is named index.php




Tags:

author:  Daryl Koopersmith


Parameters:

string   $folder   Absolute path to folder

[ Top ]

method remove_class [line 210]

void remove_class( $class)



Parameters:

   $class  

[ Top ]

method remove_view [line 256]

void remove_view( string $view)

Removes any view associated with a provided context.



Tags:

author:  Daryl Koopersmith


Overridden in child classes as:

Group::remove_view()
Override remove_view. Groups have only one view.

Parameters:

string   $view  

[ Top ]

method run [line 78]

void run( )

Calls the hooks and generates the output.



Tags:

author:  Daryl Koopersmith


Overridden in child classes as:

Selection::run()
Override run. Selections cannot be rendered.

[ Top ]

method set_view [line 231]

void set_view( string $view, string $callback, [boolean $file = false])

Binds a callback to a view. At any time, only one callback will be bound to a view.

If the callback is false, the module will not be rendered for the given view.




Tags:

author:  Daryl Koopersmith


Overridden in child classes as:

Group::set_view()
Override set_view. Groups have only one view.

Parameters:

string   $view  
string   $callback  
boolean   $file   Optional. Default false. If true, $callback is a file path, and will be included.

[ Top ]


Documentation generated on Sat, 24 Oct 2009 17:17:45 -0500 by phpDocumentor 1.4.3