Subversion-Projekte lars-tiefland.prado

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
/**
3
 * TOracleTableColumn class file.
4
 *
5
 * @author Marcos Nobre <marconobre[at]gmail[dot]com>
6
 * @link http://www.pradosoft.com/
7
 * @copyright Copyright &copy; 2005-2008 PradoSoft
8
 * @license http://www.pradosoft.com/license/
9
 * @version $Id: TOracleTableColumn.php 2482 2008-07-30 02:07:13Z knut $
10
 * @package System.Data.Common.Oracle
11
 */
12
 
13
/**
14
 * Load common TDbTableCommon class.
15
 */
16
Prado::using('System.Data.Common.TDbTableColumn');
17
 
18
/**
19
 * Describes the column metadata of the schema for a PostgreSQL database table.
20
 *
21
 * @author Marcos Nobre <marconobre[at]gmail[dot]com>
22
 * @version $Id: TOracleTableColumn.php 2482 2008-07-30 02:07:13Z knut $
23
 * @package System.Data.Common.Oracle
24
 * @since 3.1
25
 */
26
class TOracleTableColumn extends TDbTableColumn
27
{
28
	private static $types=array(
29
		'numeric' => array( 'numeric' )
30
//		'integer' => array('bit', 'bit varying', 'real', 'serial', 'int', 'integer'),
31
//		'boolean' => array('boolean'),
32
//		'float' => array('bigint', 'bigserial', 'double precision', 'money', 'numeric')
33
	);
34
 
35
	/**
36
	 * Overrides parent implementation, returns PHP type from the db type.
37
	 * @return boolean derived PHP primitive type from the column db type.
38
	 */
39
	public function getPHPType()
40
	{
41
		$dbtype = strtolower($this->getDbType());
42
		foreach(self::$types as $type => $dbtypes)
43
		{
44
			if(in_array($dbtype, $dbtypes))
45
				return $type;
46
		}
47
		return 'string';
48
	}
49
}
50
 
51
?>