Beispiel #1
0
 /**
  * @param  int $enumId
  * @return array
  */
 public function get($enumId)
 {
     $sql = 'SELECT ei.* FROM ' . $this->options->getEnumItemTableName() . ' ei
     INNER JOIN ' . $this->options->getEnumTableName() . ' e ON ei.enumeration_id = e.enumeration_id WHERE e.enumeration_id = ?';
     $statement = $this->connection->executeQuery($sql, array($enumId));
     $result = $statement->fetchAll();
     $items = array();
     foreach ($result as $row) {
         $items[$row['value']] = $row;
     }
     return $items;
 }
Beispiel #2
0
 public function testSetAndGetEnumItemTableName()
 {
     $enumItemTableName = 'foo';
     $this->options->setEnumItemTableName($enumItemTableName);
     $this->assertEquals($enumItemTableName, $this->options->getEnumItemTableName());
 }