cvs: pear /CodeGen_PECL/PECL/Element Logo.php
| From: | Hartmut Holzgraefe | Date: | Fri, 17 Feb 2006 10:24:42 +0000 |
| Subject: | cvs: pear /CodeGen_PECL/PECL/Element Logo.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-38305@lists.php.net to get a copy of this message | ||
hholzgra Fri Feb 17 10:24:42 2006 UTC
Modified files:
/pear/CodeGen_PECL/PECL/Element Logo.php
Log:
- implemented code header/footer methods
- moved inclusion of php_logos.h to code header, it is needed only once
http://cvs.php.net/viewcvs.cgi/pear/CodeGen_PECL/PECL/Element/Logo.php?r1=1.3&r2=1.4&diff_format=u
Index: pear/CodeGen_PECL/PECL/Element/Logo.php
diff -u pear/CodeGen_PECL/PECL/Element/Logo.php:1.3 pear/CodeGen_PECL/PECL/Element/Logo.php:1.4
--- pear/CodeGen_PECL/PECL/Element/Logo.php:1.3 Sat Feb 4 19:19:07 2006
+++ pear/CodeGen_PECL/PECL/Element/Logo.php Fri Feb 17 10:24:42 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: Logo.php,v 1.3 2006/02/04 19:19:07 hholzgra Exp $
+ * @version CVS: $Id: Logo.php,v 1.4 2006/02/17 10:24:42 hholzgra Exp $
* @link http://pear.php.net/package/CodeGen
*/
@@ -165,6 +165,34 @@
}
/**
+ * Generate C code header block for logos
+ *
+ * @access public
+ * @param string Extension name
+ * @return string C code
+ */
+ static function cCodeHeader($name)
+ {
+ return "
+/* {{{ phpinfo logo definitions */\n
+#include \"php_logos.h\"
+
+";
+ }
+
+ /**
+ * Generate C code footer block for logos
+ *
+ * @access public
+ * @param string Extension name
+ * @return string C code
+ */
+ static function cCodeFooter($name)
+ {
+ return "/* }}} */\n\n";
+ }
+
+ /**
* Code snippet for image data declaration
*
* @access public
@@ -174,8 +202,6 @@
function cCode($name)
{
return "
-#include \"php_logos.h\"
-
static unsigned char {$this->name}_logo[] = {
#include \"{$this->name}_logos.h\"
};