2011-07-09 16:11:40 +02:00
#!/usr/bin/php
2011-01-23 02:00:45 +01:00
< ? php
2011-08-01 00:21:57 +02:00
/* Copyright ( C ) 2008 - 2011 Laurent Destailleur < eldy @ users . sourceforge . net >
2008-01-11 19:47:30 +01:00
*
* This program is free software ; you can redistribute it and / or modify
* it under the terms of the GNU General Public License as published by
2013-01-16 15:36:08 +01:00
* the Free Software Foundation ; either version 3 of the License , or
2008-01-11 19:47:30 +01:00
* ( at your option ) any later version .
*
* This program is distributed in the hope that it will be useful ,
* but WITHOUT ANY WARRANTY ; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
* GNU General Public License for more details .
*
* You should have received a copy of the GNU General Public License
2011-08-01 00:21:57 +02:00
* along with this program . If not , see < http :// www . gnu . org / licenses />.
2008-01-11 19:47:30 +01:00
*/
/**
2009-03-29 03:25:40 +02:00
* \file dev / skeletons / build_class_from_table . php
* \ingroup core
* \brief Create a complete class file from a table in database
2008-11-20 22:26:53 +01:00
*/
2008-01-11 19:47:30 +01:00
$sapi_type = php_sapi_name ();
2009-10-22 03:04:23 +02:00
$script_file = basename ( __FILE__ );
2010-03-16 19:46:28 +01:00
$path = dirname ( __FILE__ ) . '/' ;
2008-01-11 19:47:30 +01:00
2009-10-22 03:04:23 +02:00
// Test if batch mode
if ( substr ( $sapi_type , 0 , 3 ) == 'cgi' ) {
2010-03-15 10:39:07 +01:00
echo " Error: You are using PHP for CGI. To execute " . $script_file . " from command line, you must use PHP for CLI mode. \n " ;
2009-10-22 03:04:23 +02:00
exit ;
2008-01-11 19:47:30 +01:00
}
// Include Dolibarr environment
require_once ( $path . " ../../htdocs/master.inc.php " );
// After this $db is a defined handler to database.
// Main
2012-01-18 00:15:10 +01:00
$version = '3.2' ;
2008-01-11 19:47:30 +01:00
@ set_time_limit ( 0 );
$error = 0 ;
$langs -> load ( " main " );
print " ***** $script_file ( $version ) ***** \n " ;
// -------------------- START OF BUILD_CLASS_FROM_TABLE SCRIPT --------------------
// Check parameters
if ( ! isset ( $argv [ 1 ]))
{
print " Usage: $script_file tablename \n " ;
exit ;
}
if ( $db -> type != 'mysql' && $db -> type != 'mysqli' )
{
2012-06-27 01:27:22 +02:00
print " Error: This script works with mysql or mysqli driver only \n " ;
2008-01-11 19:47:30 +01:00
exit ;
}
// Show parameters
print 'Tablename=' . $argv [ 1 ] . " \n " ;
2010-09-06 02:34:10 +02:00
print " Current dir is " . getcwd () . " \n " ;
2008-01-11 19:47:30 +01:00
2010-06-23 14:08:18 +02:00
2012-06-27 01:27:22 +02:00
// Define array with list of properties
2008-01-11 19:47:30 +01:00
$property = array ();
2012-06-27 01:27:22 +02:00
$table = $argv [ 1 ];
2008-01-11 19:47:30 +01:00
$foundprimary = 0 ;
$resql = $db -> DDLDescTable ( $table );
if ( $resql )
{
$i = 0 ;
while ( $obj = $db -> fetch_object ( $resql ))
{
2010-05-18 10:22:42 +02:00
//var_dump($obj);
2008-01-11 19:47:30 +01:00
$i ++ ;
$property [ $i ][ 'field' ] = $obj -> Field ;
if ( $obj -> Key == 'PRI' )
{
$property [ $i ][ 'primary' ] = 1 ;
$foundprimary = 1 ;
}
else
{
$property [ $i ][ 'primary' ] = 1 ;
}
$property [ $i ][ 'type' ] = $obj -> Type ;
$property [ $i ][ 'null' ] = $obj -> Null ;
2008-01-12 14:20:27 +01:00
$property [ $i ][ 'extra' ] = $obj -> Extra ;
if ( $property [ $i ][ 'type' ] == 'date'
|| $property [ $i ][ 'type' ] == 'datetime'
|| $property [ $i ][ 'type' ] == 'timestamp' )
{
$property [ $i ][ 'istime' ] = true ;
}
else
{
$property [ $i ][ 'istime' ] = false ;
}
2009-10-22 13:13:31 +02:00
if ( preg_match ( '/varchar/i' , $property [ $i ][ 'type' ])
|| preg_match ( '/text/i' , $property [ $i ][ 'type' ]))
2008-01-12 14:20:27 +01:00
{
$property [ $i ][ 'ischar' ] = true ;
}
else
{
$property [ $i ][ 'ischar' ] = false ;
}
2008-01-11 19:47:30 +01:00
}
}
else
{
print " Error: Failed to get description for table ' " . $table . " '. \n " ;
2012-06-27 01:27:22 +02:00
return false ;
2008-01-11 19:47:30 +01:00
}
//var_dump($property);
2013-01-16 12:57:09 +01:00
// Define substitute fetch/select parameters
2012-06-27 01:27:22 +02:00
$varpropselect = " \n " ;
$cleanparam = '' ;
$i = 0 ;
foreach ( $property as $key => $prop )
{
$i ++ ;
if ( $prop [ 'field' ] != 'rowid' )
{
$varpropselect .= " \t \t \$ sql.= \" " ;
$varpropselect .= " t. " . $prop [ 'field' ];
if ( $i < count ( $property )) $varpropselect .= " , " ;
$varpropselect .= " \" ; " ;
$varpropselect .= " \n " ;
}
}
//--------------------------------
// Build skeleton_class.class.php
//--------------------------------
2008-01-11 19:47:30 +01:00
2008-08-02 13:26:43 +02:00
// Define working variables
$table = strtolower ( $table );
2012-01-18 00:15:10 +01:00
$tablenoprefix = preg_replace ( '/' . preg_quote ( MAIN_DB_PREFIX ) . '/i' , '' , $table );
$classname = preg_replace ( '/_/' , '' , ucfirst ( $tablenoprefix ));
$classmin = preg_replace ( '/_/' , '' , strtolower ( $classname ));
2008-08-02 13:26:43 +02:00
2008-01-11 19:47:30 +01:00
// Read skeleton_class.class.php file
2012-01-18 00:15:10 +01:00
$skeletonfile = $path . 'skeleton_class.class.php' ;
2008-01-11 19:47:30 +01:00
$sourcecontent = file_get_contents ( $skeletonfile );
if ( ! $sourcecontent )
{
2008-02-25 00:29:30 +01:00
print " \n " ;
print " Error: Failed to read skeleton sample ' " . $skeletonfile . " ' \n " ;
print " Try to run script from skeletons directory. \n " ;
2008-01-11 19:47:30 +01:00
exit ;
}
2008-08-02 13:26:43 +02:00
// Define output variables
2008-01-11 19:47:30 +01:00
$outfile = 'out.' . $classmin . '.class.php' ;
$targetcontent = $sourcecontent ;
// Substitute class name
$targetcontent = preg_replace ( '/skeleton_class\.class\.php/' , $classmin . '.class.php' , $targetcontent );
$targetcontent = preg_replace ( '/\$element=\'skeleton\'/' , '\$element=\'' . $classmin . '\'' , $targetcontent );
$targetcontent = preg_replace ( '/\$table_element=\'skeleton\'/' , '\$table_element=\'' . $classmin . '\'' , $targetcontent );
2011-08-28 19:40:51 +02:00
$targetcontent = preg_replace ( '/Skeleton_Class/' , $classname , $targetcontent );
2008-01-11 19:47:30 +01:00
// Substitute comments
$targetcontent = preg_replace ( '/This file is an example to create a new class file/' , 'Put here description of this class' , $targetcontent );
$targetcontent = preg_replace ( '/\s*\/\/\.\.\./' , '' , $targetcontent );
2008-01-12 14:20:27 +01:00
$targetcontent = preg_replace ( '/Put here some comments/' , 'Initialy built by build_class_from_table on ' . strftime ( '%Y-%m-%d %H:%M' , mktime ()), $targetcontent );
2008-01-11 19:47:30 +01:00
// Substitute table name
2013-01-16 15:54:07 +01:00
$targetcontent = preg_replace ( '/MAIN_DB_PREFIX."mytable/' , 'MAIN_DB_PREFIX."' . $tablenoprefix , $targetcontent );
2008-01-11 19:47:30 +01:00
2008-01-12 14:20:27 +01:00
// Substitute declaration parameters
$varprop = " \n " ;
2008-01-11 19:47:30 +01:00
$cleanparam = '' ;
2008-01-12 14:20:27 +01:00
foreach ( $property as $key => $prop )
2008-01-11 19:47:30 +01:00
{
2008-01-12 14:20:27 +01:00
if ( $prop [ 'field' ] != 'rowid' )
{
2008-04-07 17:32:24 +02:00
$varprop .= " \t var \$ " . $prop [ 'field' ];
if ( $prop [ 'istime' ]) $varprop .= " ='' " ;
$varprop .= " ; " ;
2008-01-12 14:20:27 +01:00
if ( $prop [ 'comment' ]) $varprop .= " \t // " . $prop [ 'extra' ];
$varprop .= " \n " ;
}
2008-01-11 19:47:30 +01:00
}
$targetcontent = preg_replace ( '/var \$prop1;/' , $varprop , $targetcontent );
$targetcontent = preg_replace ( '/var \$prop2;/' , '' , $targetcontent );
2008-01-12 14:20:27 +01:00
// Substitute clean parameters
$varprop = " \n " ;
$cleanparam = '' ;
foreach ( $property as $key => $prop )
{
2008-01-17 22:25:46 +01:00
if ( $prop [ 'field' ] != 'rowid' && ! $prop [ 'istime' ])
2008-01-12 14:20:27 +01:00
{
2008-08-02 15:23:36 +02:00
$varprop .= " \t \t if (isset( \$ this-> " . $prop [ 'field' ] . " )) \$ this-> " . $prop [ 'field' ] . " =trim( \$ this-> " . $prop [ 'field' ] . " ); " ;
2008-01-12 14:20:27 +01:00
$varprop .= " \n " ;
}
}
2008-08-02 15:23:36 +02:00
$targetcontent = preg_replace ( '/if \(isset\(\$this->prop1\)\) \$this->prop1=trim\(\$this->prop1\);/' , $varprop , $targetcontent );
$targetcontent = preg_replace ( '/if \(isset\(\$this->prop2\)\) \$this->prop2=trim\(\$this->prop2\);/' , '' , $targetcontent );
2008-01-11 19:47:30 +01:00
2008-01-12 14:20:27 +01:00
// Substitute insert into parameters
$varprop = " \n " ;
$cleanparam = '' ;
$i = 0 ;
foreach ( $property as $key => $prop )
{
$i ++ ;
2008-04-07 17:32:24 +02:00
$addfield = 1 ;
if ( $prop [ 'field' ] == 'tms' ) $addfield = 0 ; // This is a field of type timestamp edited automatically
if ( $prop [ 'extra' ] == 'auto_increment' ) $addfield = 0 ;
if ( $addfield )
2008-01-12 14:20:27 +01:00
{
$varprop .= " \t \t \$ sql.= \" " . $prop [ 'field' ];
2011-08-28 19:40:51 +02:00
if ( $i < count ( $property )) $varprop .= " , " ;
2008-01-12 14:20:27 +01:00
$varprop .= " \" ; " ;
$varprop .= " \n " ;
}
}
$targetcontent = preg_replace ( '/\$sql\.= " field1,";/' , $varprop , $targetcontent );
$targetcontent = preg_replace ( '/\$sql\.= " field2";/' , '' , $targetcontent );
2008-01-11 19:47:30 +01:00
2008-01-12 14:20:27 +01:00
// Substitute insert values parameters
$varprop = " \n " ;
$cleanparam = '' ;
$i = 0 ;
foreach ( $property as $key => $prop )
{
$i ++ ;
2008-04-07 17:32:24 +02:00
$addfield = 1 ;
if ( $prop [ 'field' ] == 'tms' ) $addfield = 0 ; // This is a field of type timestamp edited automatically
if ( $prop [ 'extra' ] == 'auto_increment' ) $addfield = 0 ;
if ( $addfield )
2008-01-12 14:20:27 +01:00
{
$varprop .= " \t \t \$ sql.= \" " ;
2008-04-07 17:32:24 +02:00
if ( $prop [ 'istime' ])
{
2010-08-24 16:42:18 +02:00
$varprop .= '".(! isset($this->' . $prop [ 'field' ] . ') || dol_strlen($this->' . $prop [ 'field' ] . ')==0?\'NULL\':$this->db->idate(' ;
2008-04-07 17:32:24 +02:00
$varprop .= " \$ this-> " . $prop [ 'field' ] . " " ;
$varprop .= '))."' ;
2011-08-28 19:40:51 +02:00
if ( $i < count ( $property )) $varprop .= " , " ;
2008-04-07 17:32:24 +02:00
$varprop .= " \" ; " ;
}
2008-12-04 22:58:55 +01:00
elseif ( $prop [ 'ischar' ])
{
$varprop .= '".(! isset($this->' . $prop [ 'field' ] . ')?\'NULL\':"\'".' ;
2011-02-14 22:44:23 +01:00
$varprop .= '$this->db->escape($this->' . $prop [ 'field' ] . ')' ;
2008-12-04 22:58:55 +01:00
$varprop .= '."\'")."' ;
2011-08-28 19:40:51 +02:00
if ( $i < count ( $property )) $varprop .= " , " ;
2008-12-04 22:58:55 +01:00
$varprop .= '";' ;
}
2008-04-07 17:32:24 +02:00
else
{
$varprop .= '".(! isset($this->' . $prop [ 'field' ] . ')?\'NULL\':"\'".' ;
$varprop .= " \$ this-> " . $prop [ 'field' ] . " " ;
$varprop .= '."\'")."' ;
2011-08-28 19:40:51 +02:00
if ( $i < count ( $property )) $varprop .= " , " ;
2008-04-07 17:32:24 +02:00
$varprop .= '";' ;
}
2008-01-12 14:20:27 +01:00
$varprop .= " \n " ;
}
}
$targetcontent = preg_replace ( '/\$sql\.= " \'".\$this->prop1\."\',";/' , $varprop , $targetcontent );
$targetcontent = preg_replace ( '/\$sql\.= " \'".\$this->prop2\."\'";/' , '' , $targetcontent );
// Substitute update values parameters
$varprop = " \n " ;
$cleanparam = '' ;
$i = 0 ;
foreach ( $property as $key => $prop )
{
$i ++ ;
if ( $prop [ 'field' ] != 'rowid' )
{
$varprop .= " \t \t \$ sql.= \" " ;
$varprop .= $prop [ 'field' ] . '=' ;
2008-07-29 06:49:36 +02:00
if ( $prop [ 'istime' ])
{
2010-08-24 16:42:18 +02:00
// (dol_strlen($this->datep)!=0 ? "'".$this->db->idate($this->datep)."'" : 'null')
$varprop .= '".(dol_strlen($this->' . $prop [ 'field' ] . ')!=0 ? "\'".$this->db->idate(' ;
2008-07-29 06:49:36 +02:00
$varprop .= '$this->' . $prop [ 'field' ];
$varprop .= ')."\'" : \'null\').' ;
$varprop .= '"' ;
}
else
{
2008-08-02 15:23:36 +02:00
$varprop .= " \" . " ;
2011-02-14 17:18:23 +01:00
// $sql.= " field1=".(isset($this->field1)?"'".$this->db->escape($this->field1)."'":"null").",";
if ( $prop [ 'ischar' ]) $varprop .= '(isset($this->' . $prop [ 'field' ] . ')?"\'".$this->db->escape($this->' . $prop [ 'field' ] . ')."\'":"null")' ;
2008-08-02 15:23:36 +02:00
// $sql.= " field1=".(isset($this->field1)?$this->field1:"null").",";
else $varprop .= '(isset($this->' . $prop [ 'field' ] . ')?$this->' . $prop [ 'field' ] . ':"null")' ;
$varprop .= " . \" " ;
2008-07-29 06:49:36 +02:00
}
2011-08-28 19:40:51 +02:00
if ( $i < count ( $property )) $varprop .= ',' ;
2008-07-29 06:49:36 +02:00
$varprop .= '";' ;
2008-01-12 14:20:27 +01:00
$varprop .= " \n " ;
}
}
2011-03-09 01:14:25 +01:00
$targetcontent = preg_replace ( '/\$sql.= " field1=".\(isset\(\$this->field1\)\?"\'".\$this->db->escape\(\$this->field1\)."\'":"null"\).",";/' , $varprop , $targetcontent );
$targetcontent = preg_replace ( '/\$sql.= " field2=".\(isset\(\$this->field2\)\?"\'".\$this->db->escape\(\$this->field2\)."\'":"null"\)."";/' , '' , $targetcontent );
2008-01-12 14:20:27 +01:00
2013-01-16 12:57:09 +01:00
// Substitute fetch/select parameters
2012-06-27 01:27:22 +02:00
$targetcontent = preg_replace ( '/\$sql\.= " t\.field1,";/' , $varpropselect , $targetcontent );
2008-01-12 14:20:27 +01:00
$targetcontent = preg_replace ( '/\$sql\.= " t\.field2";/' , '' , $targetcontent );
// Substitute select set parameters
$varprop = " \n " ;
$cleanparam = '' ;
$i = 0 ;
foreach ( $property as $key => $prop )
{
$i ++ ;
if ( $prop [ 'field' ] != 'rowid' )
{
$varprop .= " \t \t \t \t \$ this-> " . $prop [ 'field' ] . " = " ;
2009-01-04 23:09:02 +01:00
if ( $prop [ 'istime' ]) $varprop .= '$this->db->jdate(' ;
$varprop .= '$obj->' . $prop [ 'field' ];
if ( $prop [ 'istime' ]) $varprop .= ')' ;
2008-01-12 14:20:27 +01:00
$varprop .= " ; " ;
$varprop .= " \n " ;
}
}
$targetcontent = preg_replace ( '/\$this->prop1 = \$obj->field1;/' , $varprop , $targetcontent );
$targetcontent = preg_replace ( '/\$this->prop2 = \$obj->field2;/' , '' , $targetcontent );
// Substitute initasspecimen parameters
$varprop = " \n " ;
$cleanparam = '' ;
foreach ( $property as $key => $prop )
{
if ( $prop [ 'field' ] != 'rowid' )
{
$varprop .= " \t \t \$ this-> " . $prop [ 'field' ] . " =''; " ;
$varprop .= " \n " ;
}
}
$targetcontent = preg_replace ( '/\$this->prop1=\'prop1\';/' , $varprop , $targetcontent );
$targetcontent = preg_replace ( '/\$this->prop2=\'prop2\';/' , '' , $targetcontent );
2008-01-11 19:47:30 +01:00
// Build file
$fp = fopen ( $outfile , " w " );
if ( $fp )
{
fputs ( $fp , $targetcontent );
fclose ( $fp );
2008-02-25 00:29:30 +01:00
print " \n " ;
2008-01-11 19:47:30 +01:00
print " File ' " . $outfile . " ' has been built in current directory. \n " ;
}
2008-08-02 13:26:43 +02:00
else $error ++ ;
2010-06-23 14:08:18 +02:00
//--------------------------------
// Build skeleton_script.php
//--------------------------------
2008-08-02 13:26:43 +02:00
2010-06-23 14:08:18 +02:00
// Read skeleton_script.php file
2012-01-18 00:15:10 +01:00
$skeletonfile = $path . 'skeleton_script.php' ;
2008-08-02 13:26:43 +02:00
$sourcecontent = file_get_contents ( $skeletonfile );
if ( ! $sourcecontent )
2008-01-11 19:47:30 +01:00
{
2008-08-02 13:26:43 +02:00
print " \n " ;
print " Error: Failed to read skeleton sample ' " . $skeletonfile . " ' \n " ;
print " Try to run script from skeletons directory. \n " ;
exit ;
}
// Define output variables
$outfile = 'out.' . $classmin . '_script.php' ;
$targetcontent = $sourcecontent ;
// Substitute class name
2008-08-02 13:44:17 +02:00
$targetcontent = preg_replace ( '/skeleton_class\.class\.php/' , $classmin . '.class.php' , $targetcontent );
2008-08-02 13:26:43 +02:00
$targetcontent = preg_replace ( '/skeleton_script\.php/' , $classmin . '_script.php' , $targetcontent );
$targetcontent = preg_replace ( '/\$element=\'skeleton\'/' , '\$element=\'' . $classmin . '\'' , $targetcontent );
$targetcontent = preg_replace ( '/\$table_element=\'skeleton\'/' , '\$table_element=\'' . $classmin . '\'' , $targetcontent );
2011-08-28 19:40:51 +02:00
$targetcontent = preg_replace ( '/Skeleton_Class/' , $classname , $targetcontent );
2008-08-02 13:26:43 +02:00
// Substitute comments
$targetcontent = preg_replace ( '/This file is an example to create a new class file/' , 'Put here description of this class' , $targetcontent );
$targetcontent = preg_replace ( '/\s*\/\/\.\.\./' , '' , $targetcontent );
$targetcontent = preg_replace ( '/Put here some comments/' , 'Initialy built by build_class_from_table on ' . strftime ( '%Y-%m-%d %H:%M' , mktime ()), $targetcontent );
// Substitute table name
2012-01-18 00:15:10 +01:00
$targetcontent = preg_replace ( '/MAIN_DB_PREFIX."mytable/' , 'MAIN_DB_PREFIX."' . $tablenoprefix , $targetcontent );
2008-08-02 13:26:43 +02:00
// Build file
$fp = fopen ( $outfile , " w " );
if ( $fp )
{
fputs ( $fp , $targetcontent );
fclose ( $fp );
print " File ' " . $outfile . " ' has been built in current directory. \n " ;
2008-01-11 19:47:30 +01:00
}
2008-08-02 13:26:43 +02:00
else $error ++ ;
2008-01-11 19:47:30 +01:00
2012-06-27 01:27:22 +02:00
//--------------------------------
// Build skeleton_page.php
//--------------------------------
// Read skeleton_page.php file
$skeletonfile = $path . 'skeleton_page.php' ;
$sourcecontent = file_get_contents ( $skeletonfile );
if ( ! $sourcecontent )
{
print " \n " ;
print " Error: Failed to read skeleton sample ' " . $skeletonfile . " ' \n " ;
print " Try to run script from skeletons directory. \n " ;
exit ;
}
// Define output variables
$outfile = 'out.' . $classmin . '_page.php' ;
$targetcontent = $sourcecontent ;
// Substitute class name
$targetcontent = preg_replace ( '/skeleton_class\.class\.php/' , $classmin . '.class.php' , $targetcontent );
$targetcontent = preg_replace ( '/skeleton_script\.php/' , $classmin . '_script.php' , $targetcontent );
$targetcontent = preg_replace ( '/\$element=\'skeleton\'/' , '\$element=\'' . $classmin . '\'' , $targetcontent );
$targetcontent = preg_replace ( '/\$table_element=\'skeleton\'/' , '\$table_element=\'' . $classmin . '\'' , $targetcontent );
$targetcontent = preg_replace ( '/Skeleton_Class/' , $classname , $targetcontent );
$targetcontent = preg_replace ( '/skeleton/' , $classname , $targetcontent );
// Substitute comments
$targetcontent = preg_replace ( '/This file is an example to create a new class file/' , 'Put here description of this class' , $targetcontent );
$targetcontent = preg_replace ( '/\s*\/\/\.\.\./' , '' , $targetcontent );
$targetcontent = preg_replace ( '/Put here some comments/' , 'Initialy built by build_class_from_table on ' . strftime ( '%Y-%m-%d %H:%M' , mktime ()), $targetcontent );
// Substitute table name
$targetcontent = preg_replace ( '/MAIN_DB_PREFIX."mytable/' , 'MAIN_DB_PREFIX."' . $tablenoprefix , $targetcontent );
2013-01-16 15:54:07 +01:00
// Substitute fetch/select parameters
$targetcontent = preg_replace ( '/\$sql\.= " t\.field1,";/' , $varpropselect , $targetcontent );
$targetcontent = preg_replace ( '/\$sql\.= " t\.field2";/' , '' , $targetcontent );
2013-01-16 12:57:09 +01:00
2012-06-27 01:27:22 +02:00
// Build file
$fp = fopen ( $outfile , " w " );
if ( $fp )
{
fputs ( $fp , $targetcontent );
fclose ( $fp );
print " File ' " . $outfile . " ' has been built in current directory. \n " ;
}
else $error ++ ;
2008-01-11 19:47:30 +01:00
// -------------------- END OF BUILD_CLASS_FROM_TABLE SCRIPT --------------------
2012-01-18 00:15:10 +01:00
print " You can now rename generated files by removing the 'out.' prefix in their name and store them in a directory of your choice. \n " ;
2008-01-11 19:47:30 +01:00
return $error ;
?>