示例#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;
 }
示例#2
0
 public function testSetAndGetEnumTableName()
 {
     $enumTableName = 'foo';
     $this->options->setEnumTableName($enumTableName);
     $this->assertEquals($enumTableName, $this->options->getEnumTableName());
 }