OXID eShop CE  4.10.5
 All Classes Namespaces Files Functions Variables Pages
oxlistobject.php
Go to the documentation of this file.
1 <?php
2 
7 {
8 
12  private $_sTableName = '';
13 
19  public function __construct($sTableName)
20  {
21  $this->_sTableName = $sTableName;
22  }
23 
31  public function assign($aData)
32  {
33  if (!is_array($aData)) {
34  return;
35  }
36  foreach ($aData as $sKey => $sValue) {
37  $sFieldName = strtolower($this->_sTableName . '__' . $sKey);
38  $this->$sFieldName = new oxField($sValue);
39  }
40  }
41 
47  public function getId()
48  {
49  $sFieldName = strtolower($this->_sTableName . '__oxid');
50  return $this->$sFieldName->value;
51  }
52 }