From 98dbe6f0d2edfff3a1f5785504504b4a6e5dd4eb Mon Sep 17 00:00:00 2001 From: "ctrlaltca@gmail.com" <> Date: Sat, 19 Nov 2011 11:33:31 +0000 Subject: updating phpDocumentor, part 2: add new version --- .../PhpDocumentor/phpDocumentor/EventStack.inc | 98 ++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100755 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 100755 index 00000000..4a75bba3 --- /dev/null +++ b/buildscripts/PhpDocumentor/phpDocumentor/EventStack.inc @@ -0,0 +1,98 @@ + + * @copyright 2000-2007 Joshua Eichorn + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @version CVS: $Id: EventStack.inc 243937 2007-10-10 02:27:42Z ashnazg $ + * @filesource + * @link http://www.phpdoc.org + * @link http://pear.php.net/PhpDocumentor + * @since 0.1 + * @todo CS cleanup - change package to PhpDocumentor + */ +/** + * An event Stack + * + * @category ToolsAndUtilities + * @package phpDocumentor + * @author Joshua Eichorn + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @version Release: 1.4.3 + * @link http://www.phpdoc.org + * @link http://pear.php.net/PhpDocumentor + * @todo CS cleanup - change package to 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 + * + * @return void + */ + 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