This repository has been archived on 2024-09-05. You can view files and clone it, but cannot push or open issues or pull requests.
shimmie2/core/events/pagerequest.event.php
shish 7161656063 Initial import, 2.0rc1
git-svn-id: file:///home/shish/svn/shimmie2/trunk@1 7f39781d-f577-437e-ae19-be835c7a54ca
2007-04-16 11:58:25 +00:00

31 lines
590 B
PHP

<?php
/*
* PageRequestEvent:
* $page
* $args
* get_arg(int)
* count_args()
*
* User requests /view/42 -> an event is generated with
* $page="view" and $args=array("42");
*
* Used for initial page generation triggers
*/
class PageRequestEvent extends Event {
var $page;
var $args;
public function PageRequestEvent($page, $args) {
$this->page = $page;
$this->args = $args;
}
public function get_arg($n) {
return isset($this->args[$n]) ? $this->args[$n] : null;
}
public function count_args() {
return isset($this->args) ? count($this->args) : 0;
}
}
?>