C_CustomPost_DataMapper_Driver

Class C_CustomPost_DataMapper_Driver.

Defined (1)

The class is defined in the following location(s).

/products/photocrati_nextgen/modules/datamapper/package.module.datamapper.php  
  1. class C_CustomPost_DataMapper_Driver extends C_DataMapper_Driver_Base 
  2. var $_query_args = array(); 
  3. var $_primary_key_column = 'ID'; 
  4. static $_post_table_columns = array(); 
  5. public $_use_cache = TRUE; 
  6. function define($object_name = FALSE, $context = FALSE) 
  7. if (strlen($object_name) > 20) { 
  8. throw new Exception("The custom post name can be no longer than 20 characters long"); 
  9. parent::define($object_name, $context); 
  10. $this->add_mixin('Mixin_CustomPost_DataMapper_Driver'); 
  11. $this->implement('I_CustomPost_DataMapper'); 
  12. function lookup_columns() 
  13. if (empty(self::$_post_table_columns)) { 
  14. $columns = parent::lookup_columns(); 
  15. foreach ($columns as $column) { 
  16. self::$_post_table_columns[] = $column; 
  17. } else { 
  18. foreach (self::$_post_table_columns as $column) { 
  19. $this->_table_columns[] = $column; 
  20. /** 
  21. * Gets the name of the table 
  22. * @global string $table_prefix 
  23. * @return string 
  24. */ 
  25. function get_table_name() 
  26. global $table_prefix; 
  27. return $table_prefix . 'posts';