| 123456789101112131415161718192021222324252627 |
- <?php
- // @docs in Schema_TableFactory
- class Schema_TableBase {
- public function __construct() {
- $this->_types = array();
- $this->initTypes();
- }
- public function initTypes() {// TODO: override
- // parent::initTypes();// always call parent method
- // example: $this->_types['WWW'] = 'p5:www_link';
- // TODO: $this->_types['WWW'] = new Type_Link($params = array('maxLength' => 255, ...));
- }
- public function fixTypes($types) {
- if (!is_array($this->_types)) return;
- foreach ($types as $fldName => $type) {
- if (array_key_exists($fldName, $this->_types)) {
- $types[$fldName]['simpleType'] = $this->_types[$fldName];
- }
- }
- return $types;
- }
- }
|