cvs: pear /MDB2_Schema/docs/examples parse.php
| From: | Lukas Smith | Date: | Tue, 15 Aug 2006 21:58:57 +0000 |
| Subject: | cvs: pear /MDB2_Schema/docs/examples parse.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-41621@lists.php.net to get a copy of this message | ||
lsmith Tue Aug 15 21:58:57 2006 UTC
Modified files:
/pear/MDB2_Schema/docs/examples parse.php
Log:
- fixed parser constructor call
- PEAR CS fixes
http://cvs.php.net/viewvc.cgi/pear/MDB2_Schema/docs/examples/parse.php?r1=1.2&r2=1.3&diff_format=u
Index: pear/MDB2_Schema/docs/examples/parse.php
diff -u pear/MDB2_Schema/docs/examples/parse.php:1.2 pear/MDB2_Schema/docs/examples/parse.php:1.3
--- pear/MDB2_Schema/docs/examples/parse.php:1.2 Tue Aug 15 21:45:15 2006
+++ pear/MDB2_Schema/docs/examples/parse.php Tue Aug 15 21:58:57 2006
@@ -42,7 +42,7 @@
// | Author: Igor Feghali <ifeghali@php.net> |
// +----------------------------------------------------------------------+
//
-// $Id: parse.php,v 1.2 2006/08/15 21:45:15 lsmith Exp $
+// $Id: parse.php,v 1.3 2006/08/15 21:58:57 lsmith Exp $
//
#ini_set('include_path',
'../../'.PATH_SEPARATOR.ini_get('include_path'));
@@ -50,20 +50,17 @@
include 'MDB2/Schema.php';
include 'MDB2/Schema/Parser.php';
-$parser =& new MDB2_Schema_Parser(array());
+$parser =& new MDB2_Schema_Parser(array(), false, false, $valid_types =
array('integer' => 0, 'timestamp' => '0001-01-01 00:00:00'),
true);
$parser->setInputFile("schema.xml");
$result = $parser->parse();
?>
<pre>
<?php
-if (PEAR::isError($schema->error))
-{
- print_r($parser->error);
-}
-else
-{
- print_r($parser->database_definition['tables']['Example']);
+if (PEAR::isError($result)) {
+ var_dump($result);
+} else {
+ var_dump($parser->database_definition);
}
?>