Shimmie2 / SCore
Public Member Functions | Public Attributes
PageRequestEvent Class Reference

A signal that a page has been requested. More...

Inheritance diagram for PageRequestEvent:
Event

List of all members.

Public Member Functions

 __construct ($args)
 page_matches ($name)
 Test if the requested path matches a given pattern.
 get_arg ($n)
 Get the n th argument of the page request (if it exists.)
 count_args ()
 Returns the number of arguments the page request has.
 get_search_terms ()
 get_page_number ()
 get_page_size ()

Public Attributes

 $args
 $arg_count
 $part_count

Detailed Description

A signal that a page has been requested.

User requests /view/42 -> an event is generated with $args = array("view", "42"); when an event handler asks $event->page_matches("view"), it returns true and ignores the matched part, such that $event->count_args() = 1 and $event->get_arg(0) = "42"


Constructor & Destructor Documentation

PageRequestEvent::__construct ( args)

Member Function Documentation

PageRequestEvent::count_args ( )

Returns the number of arguments the page request has.

Return values:
int
PageRequestEvent::get_arg ( n)

Get the n th argument of the page request (if it exists.)

Parameters:
$ninteger
Return values:
Theargmuent (string) or NULL
PageRequestEvent::get_page_number ( )
PageRequestEvent::get_page_size ( )
PageRequestEvent::get_search_terms ( )
PageRequestEvent::page_matches ( name)

Test if the requested path matches a given pattern.

If it matches, store the remaining path elements in $args

Return values:
bool

Member Data Documentation

PageRequestEvent::$arg_count
PageRequestEvent::$args
PageRequestEvent::$part_count

The documentation for this class was generated from the following file: