Example #1
0
 /**
  * @param int         $primary_key
  * @param arConnector $connector
  */
 public function __construct($primary_key = 0, arConnector $connector = NULL)
 {
     if ($connector == NULL) {
         $connector = new arConnectorDB();
     }
     //$this->arConnector = $connector;
     arConnectorMap::register($this, $connector);
     $arFieldList = arFieldCache::get($this);
     //$this->arFieldList = $arFieldList ;
     $key = $arFieldList->getPrimaryFieldName();
     $this->{$key} = $primary_key;
     if ($primary_key !== 0 and $primary_key !== NULL and $primary_key !== false) {
         $this->read();
     }
 }
 /**
  * @return arConnector
  */
 protected function getArConnector()
 {
     return arConnectorMap::get($this->getAR());
 }