Advertisement
Guest User

Untitled

a guest
May 29th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.72 KB | None | 0 0
  1. class Application_Model_DbTable_Profiles extends Zend_Db_Table_Abstract
  2. {
  3.  
  4.     protected $_name = 'profiles';
  5.     /**
  6.      *
  7.      */
  8.     protected $_habtm = array(
  9.         'ethnicity_options',
  10.         'spoken_language_options',
  11.         'relationship_type_options'
  12.     );
  13.  
  14.     public function  __construct($config = array()) {
  15.         parent::__construct($config);
  16.    
  17.         foreach($_habtm as $k=>$table_name)
  18.         {
  19.             if(strcasecmp($table_name, $this->_name))
  20.             {
  21.                 $this->_habtm[$k] = $this->_name . "_" . $table_name;
  22.             }
  23.             else
  24.             {
  25.                 $this->_habtm[$k] = $table_name . "_" . $this->_name;
  26.             }
  27.         }
  28.     }
  29. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement