Zikula_Core
[ class tree: Zikula_Core ] [ index: Zikula_Core ] [ all elements ]

Source for file pntables.php

Documentation is available at pntables.php

  1. <?php
  2. /**
  3.  * Zikula Application Framework
  4.  *
  5.  * @copyright Robert Gasch
  6.  * @link http://www.zikula.org
  7.  * @version $Id: pntables.php 24342 2008-06-06 12:03:14Z markwest $
  8.  * @license GNU/GPL - http://www.gnu.org/copyleft/gpl.html
  9.  * @author Robert Gasch rgasch@gmail.com
  10.  * @package Zikula_Core
  11.  */
  12.  
  13.  
  14. /**
  15.  * This function is called internally by the core whenever the module is loaded.
  16.  */
  17. {
  18.     // Initialise table array
  19.     $pntables array();
  20.  
  21.     $table DBUtil::getLimitedTablename('objectdata_attributes');
  22.     $pntables['objectdata_attributes'$table;
  23.     $columns array ('id'             => 'oba_id',
  24.                       'attribute_name' => 'oba_attribute_name',
  25.                       'object_id'      => 'oba_object_id',
  26.                       'object_type'    => 'oba_object_type',
  27.                       'value'          => 'oba_value'
  28.                       );
  29.     ObjectUtil::addStandardFieldsToTableDefinition ($columns'oba_');
  30.     $pntables['objectdata_attributes_column'$columns;
  31.  
  32.     $tabledef array('id'             => 'I4 PRIMARY AUTO',
  33.                       'attribute_name' => "C(80) NOTNULL DEFAULT ''",
  34.                       'object_id'      => 'I4 NOTNULL DEFAULT 0',
  35.                       'object_type'    => "C(80) NOTNULL DEFAULT ''",
  36.                       'value'          => "C(255) NOTNULL DEFAULT ''");
  37.     ObjectUtil::addStandardFieldsToTableDataDefinition ($tabledef'oba_');
  38.     $pntables['objectdata_attributes_column_def'$tabledef;
  39.  
  40.     $table DBUtil::getLimitedTablename('objectdata_log');
  41.     $pntables['objectdata_log'$table;
  42.     $columns array ('id'           => 'obl_id',
  43.                       'object_type'  => 'obl_object_type',
  44.                       'object_id'    => 'obl_object_id',
  45.                       'op'           => 'obl_op',
  46.                       'diff'         => 'obl_diff');
  47.     ObjectUtil::addStandardFieldsToTableDefinition ($columns'obl_');
  48.     $pntables['objectdata_log_column'$columns;
  49.  
  50.     $tabledef array('id' => 'I4 PRIMARY AUTO',
  51.                       'object_type' => "C(80) NOTNULL DEFAULT ''",
  52.                       'object_id' => 'I4 NOTNULL DEFAULT 0',
  53.                       'op' => "C(16) NOTNULL DEFAULT ''",
  54.                       'diff' => "X NOT NULL DEFAULT ''");
  55.     ObjectUtil::addStandardFieldsToTableDataDefinition ($tabledef'obl_');
  56.     $pntables['objectdata_log_column_def'$tabledef;
  57.  
  58.     $table DBUtil::getLimitedTablename('objectdata_meta');
  59.     $pntables['objectdata_meta'$table;
  60.     $columns array ('id'             => 'obm_id',
  61.                       'module'         => 'obm_module',
  62.                       'table'          => 'obm_table',
  63.                       'idcolumn'       => 'obm_idcolumn',
  64.                       'obj_id'         => 'obm_obj_id',
  65.                       'permissions'    => 'obm_permissions',
  66.                       'dc_title'       => 'obm_dc_title',
  67.                       'dc_author'      => 'obm_dc_author',
  68.                       'dc_subject'     => 'obm_dc_subject',
  69.                       'dc_keywords'    => 'obm_dc_keywords',
  70.                       'dc_description' => 'obm_dc_description',
  71.                       'dc_publisher'   => 'obm_dc_publisher',
  72.                       'dc_contributor' => 'obm_dc_contributor',
  73.                       'dc_startdate'   => 'obm_dc_startdate',
  74.                       'dc_enddate'     => 'obm_dc_enddate',
  75.                       'dc_type'        => 'obm_dc_type',
  76.                       'dc_format'      => 'obm_dc_format',
  77.                       'dc_uri'         => 'obm_dc_uri',
  78.                       'dc_source'      => 'obm_dc_source',
  79.                       'dc_language'    => 'obm_dc_language',
  80.                       'dc_relation'    => 'obm_dc_relation',
  81.                       'dc_coverage'    => 'obm_dc_coverage',
  82.                       'dc_entity'      => 'obm_dc_entity',
  83.                       'dc_comment'     => 'obm_dc_comment',
  84.                       'dc_extra'       => 'obm_dc_extra');
  85.     ObjectUtil::addStandardFieldsToTableDefinition ($columns'obm_');
  86.     $pntables['objectdata_meta_column'$columns;
  87.  
  88.     $tabledef array('id'             => 'I4 PRIMARY AUTO',
  89.                       'module'         => "C(40) NOTNULL DEFAULT ''",
  90.                       'table'          => "C(40) NOTNULL DEFAULT ''",
  91.                       'idcolumn'       => "C(40) NOTNULL DEFAULT ''",
  92.                       'obj_id'         => 'I4 NOTNULL DEFAULT 0',
  93.                       'permissions'    => "C(255) DEFAULT ''",
  94.                       'dc_title'       => "C(80) DEFAULT ''",
  95.                       'dc_author'      => "C(80) DEFAULT ''",
  96.                       'dc_subject'     => "C(255) DEFAULT ''",
  97.                       'dc_keywords'    => "C(128) DEFAULT ''",
  98.                       'dc_description' => "C(255) DEFAULT ''",
  99.                       'dc_publisher'   => "C(128) DEFAULT ''",
  100.                       'dc_contributor' => "C(128) DEFAULT ''",
  101.                       'dc_startdate'   => "T DEFAULT '1970-01-01 00:00:00'",
  102.                       'dc_enddate'     => "T DEFAULT '1970-01-01 00:00:00'",
  103.                       'dc_type'        => "C(128) DEFAULT ''",
  104.                       'dc_format'      => "C(128) DEFAULT ''",
  105.                       'dc_uri'         => "C(255) DEFAULT ''",
  106.                       'dc_source'      => "C(128) DEFAULT ''",
  107.                       'dc_language'    => "C(32) DEFAULT ''",
  108.                       'dc_relation'    => "C(255) DEFAULT ''",
  109.                       'dc_coverage'    => "C(64) DEFAULT ''",
  110.                       'dc_entity'      => "C(64) DEFAULT ''",
  111.                       'dc_comment'     => "C(255) DEFAULT ''",
  112.                       'dc_extra'       => "C(255) DEFAULT ''");
  113.     ObjectUtil::addStandardFieldsToTableDataDefinition ($tabledef'obm_');
  114.     $pntables['objectdata_meta_column_def'$tabledef;
  115.  
  116.     return $pntables;
  117. }

Documentation generated on Fri, 18 Jul 2008 21:54:28 +0200 by phpDocumentor 1.4.1