コード例 #1
0
 function lookup_columns()
 {
     if (empty(self::$_post_table_columns)) {
         $columns = parent::lookup_columns();
         foreach ($columns as $column) {
             self::$_post_table_columns[] = $column;
         }
     } else {
         foreach (self::$_post_table_columns as $column) {
             $this->_table_columns[] = $column;
         }
     }
 }
コード例 #2
0
 function initialize($object_name)
 {
     if (strlen($object_name) > 20) {
         throw new Exception("The custom post name can be no longer than 20 characters long");
     }
     parent::initialize($object_name);
 }
コード例 #3
0
 function define($object_name, $context = FALSE)
 {
     if (strlen($object_name) > 20) {
         throw new Exception("The custom post name can be no longer than 20 characters long");
     }
     parent::define($object_name, $context);
     $this->add_mixin('Mixin_CustomPost_DataMapper_Driver');
     $this->implement('I_CustomPost_DataMapper');
 }
 function initialize($object_name)
 {
     parent::initialize($object_name);
     if (!isset($this->_primary_key_column)) {
         $this->_primary_key_column = $this->_lookup_primary_key_column();
     }
 }