Event
[
class tree: Event
] [
index: Event
] [
all elements
]
Todo List
Packages:
MVClasses
CommandResolver
Commands
Controler
Event
EventHandler
Filter
Registry
RequestResponse
TemplateView
ViewHelper
Source for file Event.php
Documentation is available at
Event.php
<?php
/**
* MVClasses
*
* LICENSE
*
* "THE BEER-WARE LICENSE" (Revision 42):
* "Sven Strittmatter" <ausserirdisch@sven-space.de> wrote this file.
* As long as you retain this notice you can do whatever you want with
* this stuff. If we meet some day, and you think this stuff is worth it,
* you can buy me a beer in return.
*
*
@category
MVClasses
*
@package
Event
*
@copyright
Copyright (c) 2007 Sven Strittmatter
*/
/**
* Event
*
* Ein Event ist ein Ereignis-Objekt das in einem Kontext -
* meist ein Objekt - ausgeloesst wird.
*
*
@category
MVClasses
*
@package
Event
*
@copyright
Copyright (c) 2007 Sven Strittmatter
*
@author
"Sven Strittmatter" <ausserirdisch@sven-space.de>
*
@version
1.0
*
@link
http://www.sven-space.de/code/php/MVClasses
*/
class
Event
{
/**
* Der Name des Events.
*
*
@access
private
*
@var
string
*/
private
$_name
;
/**
* Der Kontext in dem der Event entstanden ist.
* Meistens die Referenz auf das Objekt, welches
* den Event ausgeloesst hat.
*
*
@access
privat
*
@var
object
*/
private
$_context
;
/**
* Zusaetzliche Information zu dem Event.
*
*
@access
private
*
@var
mixed
*/
private
$_info
;
/**
* Zeigt an ob ein Event gestoppt wurde
* und nicht mehr weiter verarbeitet werden soll.
*
*
@access
private
*
@var
boolean
*/
private
$_cancelled
;
/**
* Konstruktor.
*
*
@access
public
*
@param
string
$name
*
@param
object
$context
*
@param
mixed
$info
= null
*/
public
function
__construct
(
$name
,
$context
=
null
,
$info
=
null
)
{
$this
->
_name
=
$name
;
$this
->
_context
=
$context
;
$this
->
_info
=
$info
;
$this
->
_cancelled
=
false
;
}
/**
* Gibt den Namen des Events zurueck.
*
*
@access
private
*
@return
string
*/
public
function
getName
(
)
{
return
$this
->
_name
;
}
/**
* Liefert das Kontextobjekt zurueck.
*
*
@access
private
*
@return
object
*/
public
function
getContext
(
)
{
return
$this
->
_context
;
}
/**
* Gibt zusaetzliche Informationen des Events zurueck.
*
*
@access
public
*
@return
mixed
*/
public
function
getInfo
(
)
{
return
$this
->
_info
;
}
/**
* Gibt zurueck ob der Event gestopt wurde und
* nicht mehr weiter verarbeitet werden soll.
*
*
@access
public
*
@return
boolean
*/
public
function
isCancelled
(
)
{
return
$this
->
_cancelled
;
}
/**
* Stoppt ein Event, damit es nicht mehr weiterhin
* beachtet wird in einer Bearbeitungskette.
*
*
@access
public
*/
public
function
cancel
(
)
{
$this
->
_cancelled
=
true
;
}
}
Documentation generated on Sun, 02 Aug 2009 17:14:53 +0200 by
phpDocumentor 1.4.2