From b59ab2490b1bb82dc1d0b58d89584182b405d0a0 Mon Sep 17 00:00:00 2001 From: xue <> Date: Mon, 19 Jun 2006 02:31:27 +0000 Subject: build script update. Fixed #82 and #165. --- .../PhpDocumentor/phpDocumentor/EventStack.inc | 78 ++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 buildscripts/PhpDocumentor/phpDocumentor/EventStack.inc (limited to 'buildscripts/PhpDocumentor/phpDocumentor/EventStack.inc') diff --git a/buildscripts/PhpDocumentor/phpDocumentor/EventStack.inc b/buildscripts/PhpDocumentor/phpDocumentor/EventStack.inc new file mode 100644 index 00000000..5e2690e8 --- /dev/null +++ b/buildscripts/PhpDocumentor/phpDocumentor/EventStack.inc @@ -0,0 +1,78 @@ + + * @version $Id: EventStack.inc,v 1.1 2005/10/17 18:36:55 jeichorn Exp $ + * @package phpDocumentor + */ +/** + * An event Stack + * + * @author Joshua Eichorn + * @version $Id: EventStack.inc,v 1.1 2005/10/17 18:36:55 jeichorn Exp $ + * @package phpDocumentor + */ +class EventStack +{ + /** + * The stack + * @var array + */ + var $stack = array(PARSER_EVENT_NOEVENTS); + + /** + * The number of events in the stack + * @var integer + */ + var $num = 0; + + /** + * Push an event onto the stack + * + * @param int $event All events must be constants + */ + function pushEvent($event) + { + $this->num = array_push($this->stack,$event) - 1; + } + + /** + * Pop an event from the stack + * + * @return int An event + */ + function popEvent() + { + $this->num--; + return array_pop($this->stack); + } + + /** + * Get the current event + * + * @return int An event + */ + function getEvent() + { + return $this->stack[$this->num]; + } +} -- cgit v1.2.3