cvs: pear /CodeGen_PECL/PECL ExtensionParser.php

From: Date: Mon, 06 Mar 2006 20:36:33 +0000
Subject: cvs: pear /CodeGen_PECL/PECL ExtensionParser.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-38953@lists.php.net to get a copy of this message
hholzgra Mon Mar 6 20:36:33 2006 UTC Modified files: /pear/CodeGen_PECL/PECL ExtensionParser.php Log: more attribute checks http://cvs.php.net/viewcvs.cgi/pear/CodeGen_PECL/PECL/ExtensionParser.php?r1=1.35&r2=1.36&diff_format=u Index: pear/CodeGen_PECL/PECL/ExtensionParser.php diff -u pear/CodeGen_PECL/PECL/ExtensionParser.php:1.35 pear/CodeGen_PECL/PECL/ExtensionParser.php:1.36 --- pear/CodeGen_PECL/PECL/ExtensionParser.php:1.35 Mon Mar 6 20:21:04 2006 +++ pear/CodeGen_PECL/PECL/ExtensionParser.php Mon Mar 6 20:36:33 2006 @@ -15,7 +15,7 @@ * @author Hartmut Holzgraefe <hartmut@php.net> * @copyright 2005 Hartmut Holzgraefe * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: ExtensionParser.php,v 1.35 2006/03/06 20:21:04 hholzgra Exp $ + * @version CVS: $Id: ExtensionParser.php,v 1.36 2006/03/06 20:36:33 hholzgra Exp $ * @link http://pear.php.net/package/CodeGen */ @@ -795,7 +795,7 @@ function tagstart_class($attr) { $err = $this->checkAttributes($attr, array("name", "extends", "final", "abstract")); - if ($err) { + if (PEAR::isError($err)) { return $err; } @@ -844,6 +844,11 @@ function tagend_class_implements($attr, $data) { + $err = $this->checkAttributes($attr, array("interface")); + if (PEAR::isError($err)) { + return $err; + } + if (!isset($attr["interface"])) { return PEAR::raiseError("intarface attribute missing for <implements>"); } @@ -854,6 +859,9 @@ function tagstart_class_property($attr) { $err = $this->checkAttributes($attr, array("name", "type", "value", "access", "static")); + if (PEAR::isError($err)) { + return $err; + } $prop = new CodeGen_PECL_Element_Property; @@ -898,6 +906,11 @@ function tagstart_class_constant($attr) { + $err = $this->checkAttributes($attr, array("name", "type", "value")); + if (PEAR::isError($err)) { + return $err; + } + $const = new CodeGen_PECL_Element_ClassConstant; if (!isset($attr["name"])) { @@ -927,6 +940,13 @@ return $this->helper->addConstant($const); } + function tagstart_class_payload($attr) + { + $err = $this->checkAttributes($attr, array("type", "alloc")); + if (PEAR::isError($err)) { + return $err; + } + } function tagend_class_payload($attr, $data) {

« previous php.pear.cvs (#38953) next »