cvs: pear /CodeGen_MySQL_Plugin package.xml /CodeGen_MySQL_Plugin/MySQL/Plugin Extension.php ExtensionParser.php
/CodeGen_MySQL_Plugin/MySQL/Plugin/Element Storage.php

From: Date: Thu, 09 Feb 2006 22:31:08 +0000
Subject: cvs: pear /CodeGen_MySQL_Plugin package.xml /CodeGen_MySQL_Plugin/MySQL/Plugin Extension.php ExtensionParser.php
/CodeGen_MySQL_Plugin/MySQL/Plugin/Element Storage.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-38093@lists.php.net to get a copy of this message
hholzgra Thu Feb 9 22:31:08 2006 UTC Added files: /pear/CodeGen_MySQL_Plugin/MySQL/Plugin/Element Storage.php Modified files: /pear/CodeGen_MySQL_Plugin/MySQL/Plugin ExtensionParser.php Extension.php /pear/CodeGen_MySQL_Plugin package.xml Log: started to add storage engine plugin support, work in progress, no useable output yet http://cvs.php.net/viewcvs.cgi/pear/CodeGen_MySQL_Plugin/MySQL/Plugin/ExtensionParser.php?r1=1.2&r2=1.3&diff_format=u Index: pear/CodeGen_MySQL_Plugin/MySQL/Plugin/ExtensionParser.php diff -u pear/CodeGen_MySQL_Plugin/MySQL/Plugin/ExtensionParser.php:1.2 pear/CodeGen_MySQL_Plugin/MySQL/Plugin/ExtensionParser.php:1.3 --- pear/CodeGen_MySQL_Plugin/MySQL/Plugin/ExtensionParser.php:1.2 Sat Feb 4 19:27:06 2006 +++ pear/CodeGen_MySQL_Plugin/MySQL/Plugin/ExtensionParser.php Thu Feb 9 22:31:08 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.2 2006/02/04 19:27:06 hholzgra Exp $ + * @version CVS: $Id: ExtensionParser.php,v 1.3 2006/02/09 22:31:08 hholzgra Exp $ * @link http://pear.php.net/package/CodeGen_MySQL_Plugin */ @@ -113,9 +113,32 @@ // ___) | || (_) | | | (_| | (_| | __/ // |____/ \__\___/|_| \__,_|\__, |\___| // |___/ + + function tagstart_plugin_storage($attr) + { + $this->checkAttributes($attr, array(), array("name")); + $this->pushHelper(new CodeGen_Mysql_Plugin_Element_Storage); + $this->helper->setName($attr["name"]); + } + function tagend_plugin_storage($attr, $data) + { + $err = $this->extension->addPlugin($this->helper); + $this->popHelper(); + return $err; + } + + function tagend_storage_init($attr, $data) + { + return $this->helper->setInitCode($data); + } + + function tagend_storage_deinit($attr, $data) + { + return $this->helper->setDeinitCode($data); + } } http://cvs.php.net/viewcvs.cgi/pear/CodeGen_MySQL_Plugin/MySQL/Plugin/Extension.php?r1=1.4&r2=1.5&diff_format=u Index: pear/CodeGen_MySQL_Plugin/MySQL/Plugin/Extension.php diff -u pear/CodeGen_MySQL_Plugin/MySQL/Plugin/Extension.php:1.4 pear/CodeGen_MySQL_Plugin/MySQL/Plugin/Extension.php:1.5 --- pear/CodeGen_MySQL_Plugin/MySQL/Plugin/Extension.php:1.4 Sat Feb 4 19:27:06 2006 +++ pear/CodeGen_MySQL_Plugin/MySQL/Plugin/Extension.php Thu Feb 9 22:31:08 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: Extension.php,v 1.4 2006/02/04 19:27:06 hholzgra Exp $ + * @version CVS: $Id: Extension.php,v 1.5 2006/02/09 22:31:08 hholzgra Exp $ * @link http://pear.php.net/package/CodeGen_MySQL_Plugin */ @@ -28,6 +28,7 @@ require_once "CodeGen/MySQL/Plugin/Element.php"; require_once "CodeGen/MySQL/Plugin/Element/Fulltext.php"; +require_once "CodeGen/MySQL/Plugin/Element/Storage.php"; // }}} http://cvs.php.net/viewcvs.cgi/pear/CodeGen_MySQL_Plugin/package.xml?r1=1.2&r2=1.3&diff_format=u Index: pear/CodeGen_MySQL_Plugin/package.xml diff -u pear/CodeGen_MySQL_Plugin/package.xml:1.2 pear/CodeGen_MySQL_Plugin/package.xml:1.3 --- pear/CodeGen_MySQL_Plugin/package.xml:1.2 Sat Feb 4 19:27:06 2006 +++ pear/CodeGen_MySQL_Plugin/package.xml Thu Feb 9 22:31:08 2006 @@ -53,6 +53,7 @@ <file role="php">ExtensionParser.php</file> <dir name="Element"> <file role="php">Fulltext.php</file> + <file role="php">Storage.php</file> </dir> </dir> </dir> http://cvs.php.net/viewcvs.cgi/pear/CodeGen_MySQL_Plugin/MySQL/Plugin/Element/Storage.php?view=markup&rev=1.1 Index: pear/CodeGen_MySQL_Plugin/MySQL/Plugin/Element/Storage.php +++ pear/CodeGen_MySQL_Plugin/MySQL/Plugin/Element/Storage.php <?php /** * A class that generates MySQL Plugin soure and documenation files * * PHP versions 5 * * LICENSE: This source file is subject to version 3.0 of the PHP license * that is available through the world-wide-web at the following URI: * http://www.php.net/license/3_0.txt. If you did not receive a copy of * the PHP License and are unable to obtain it through the web, please * send a note to license@php.net so we can mail you a copy immediately. * * @category Tools and Utilities * @package CodeGen_MySQL_Plugin * @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: Storage.php,v 1.1 2006/02/09 22:31:08 hholzgra Exp $ * @link http://pear.php.net/package/CodeGen_MySQL_Plugin */ /** * includes */ // {{{ includes require_once "CodeGen/MySQL/Plugin/Element.php"; // }}} /** * A class that generates Plugin extension soure and documenation files * * @category Tools and Utilities * @package CodeGen_MySQL_Plugin * @author Hartmut Holzgraefe <hartmut@php.net> * @copyright 2005 Hartmut Holzgraefe * @license http://www.php.net/license/3_0.txt PHP License 3.0 * @version Release: @package_version@ * @link http://pear.php.net/package/CodeGen_MySQL_Plugin */ class CodeGen_MySQL_Plugin_Element_Storage extends CodeGen_MySQL_Plugin_Element { /** * Constructor */ function __construct() { parent::__construct(); } /** * Plugin type specifier is needed for plugin registration * * @param void * @return string */ function getPluginType() { return "MYSQL_STORAGE_ENGINE_PLUGIN"; } function getPluginCode() { $name = $this->name; $lowname = strtolower($name); $upname = strtoupper($name); return parent::getPluginCode()." handlerton {$lowname}_hton= { \"$upname\", SHOW_OPTION_YES, \"{$this->summary}\", DB_TYPE_CUSTOM, NULL, /* Initialize */ 0, /* slot */ 0, /* savepoint size. */ NULL, /* close_connection */ NULL, /* savepoint */ NULL, /* rollback to savepoint */ NULL, /* release savepoint */ NULL, /* commit */ NULL, /* rollback */ NULL, /* prepare */ NULL, /* recover */ NULL, /* commit_by_xid */ NULL, /* rollback_by_xid */ NULL, /* create_cursor_read_view */ NULL, /* set_cursor_read_view */ NULL, /* close_cursor_read_view */ {$lowname}_create_handler, /* Create a new handler */ NULL, /* Drop a database */ NULL, /* Panic call */ NULL, /* Release temporary latches */ NULL, /* Update Statistics */ NULL, /* Start Consistent Snapshot */ NULL, /* Flush logs */ NULL, /* Show status */ NULL, /* Replication Report Sent Binlog */ HTON_CAN_RECREATE }; "; } }

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