cvs: pear /DB_DataObject/DataObject Generator.php

From: Date: Mon, 15 Jan 2007 07:39:24 +0000
Subject: cvs: pear /DB_DataObject/DataObject Generator.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-44223@lists.php.net to get a copy of this message
alan_k Mon Jan 15 07:39:24 2007 UTC Modified files: /pear/DB_DataObject/DataObject Generator.php Log: add in docbook hooks to generator - as requested/coded by Vyacheslav Iutin http://cvs.php.net/viewvc.cgi/pear/DB_DataObject/DataObject/Generator.php?r1=1.123&r2=1.124&diff_format=u Index: pear/DB_DataObject/DataObject/Generator.php diff -u pear/DB_DataObject/DataObject/Generator.php:1.123 pear/DB_DataObject/DataObject/Generator.php:1.124 --- pear/DB_DataObject/DataObject/Generator.php:1.123 Tue Jan 9 04:41:25 2007 +++ pear/DB_DataObject/DataObject/Generator.php Mon Jan 15 07:39:24 2007 @@ -15,7 +15,7 @@ * @author Alan Knowles <alan@akbkhome.com> * @copyright 1997-2006 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Generator.php,v 1.123 2007/01/09 04:41:25 alan_k Exp $ + * @version CVS: $Id: Generator.php,v 1.124 2007/01/15 07:39:24 alan_k Exp $ * @link http://pear.php.net/package/DB_DataObject */ @@ -783,11 +783,17 @@ { // title = expand me! $foot = ""; - $head = "<?php\n/**\n * Table Definition for {$this->table}\n */\n"; + $head = "<?php\n/**\n * Table Definition for {$this->table}\n"; + $head .= $this->derivedHookPageLevelDocBlock(); + $head .= " */\n"; + $head .= $this->derivedHookExtendsDocBlock(); + + // requires $head .= "require_once '{$this->_extendsFile}';\n\n"; // add dummy class header in... - // class + // class + $head .= $this->derivedHookClassDocBlock(); $head .= "class {$this->classname} extends {$this->_extends} \n{"; $body = "\n ###START_AUTOCODE\n"; @@ -985,6 +991,42 @@ return ""; } + /** + * hook to add extra page-level (in terms of phpDocumentor) DocBlock + * + * called once for each class, use it add extra page-level docs + * @access public + * @return string added to class eg. functions. + */ + function derivedHookPageLevelDocBlock() { + return ''; + } + + /** + * hook to add extra doc block (in terms of phpDocumentor) to extend string + * + * called once for each class, use it add extra comments to extends + * string (require_once...) + * @access public + * @return string added to class eg. functions. + */ + function derivedHookExtendsDocBlock() { + return ''; + } + + /** + * hook to add extra class level DocBlock (in terms of phpDocumentor) + * + * called once for each class, use it add extra comments to class + * string (require_once...) + * @access public + * @return string added to class eg. functions. + */ + function derivedHookClassDocBlock() { + return ''; + } + + /** /** * getProxyFull - create a class definition on the fly and instantate it..

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