Some more comments.
This commit is contained in:
parent
5af54bb9e0
commit
ac1b3d00e2
@ -39,6 +39,8 @@ class PageRequestEvent extends Event {
|
||||
* Test if the requested path matches a given pattern.
|
||||
*
|
||||
* If it matches, store the remaining path elements in $args
|
||||
*
|
||||
* @retval bool
|
||||
*/
|
||||
public function page_matches(/*string*/ $name) {
|
||||
$parts = explode("/", $name);
|
||||
@ -57,6 +59,11 @@ class PageRequestEvent extends Event {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the n th argument of the page request (if it exists.)
|
||||
* @param $n integer
|
||||
* @retval The argmuent (string) or NULL
|
||||
*/
|
||||
public function get_arg(/*int*/ $n) {
|
||||
$offset = $this->part_count + $n;
|
||||
if($offset >= 0 && $offset < $this->arg_count) {
|
||||
@ -67,6 +74,10 @@ class PageRequestEvent extends Event {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the number of arguments the page request has.
|
||||
* @retval int
|
||||
*/
|
||||
public function count_args() {
|
||||
return (int)($this->arg_count - $this->part_count);
|
||||
}
|
||||
|
@ -237,7 +237,7 @@ class Page {
|
||||
protected function add_auto_html_headers() {
|
||||
$data_href = get_base_href();
|
||||
|
||||
$this->add_html_header("<script>base_href = '$data_href';</script>");
|
||||
$this->add_html_header("<script type='text/javascript'>base_href = '$data_href';</script>");
|
||||
|
||||
/* Attempt to cache the CSS & JavaScript files */
|
||||
if ($this->add_cached_auto_html_headers() === FALSE) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user