PHPUnit_Extensions_Database_DataSet_AbstractTable::getRow PHP Method

getRow() public method

Returns the an associative array keyed by columns for the given row.
public getRow ( integer $row ) : array
$row integer
return array
    public function getRow($row)
    {
        if (isset($this->data[$row])) {
            return $this->data[$row];
        } else {
            if ($this->getRowCount() <= $row) {
                throw new InvalidArgumentException("The given row ({$row}) does not exist in table {$this->getTableMetaData()->getTableName()}");
            } else {
                return NULL;
            }
        }
    }

Usage Example

Beispiel #1
0
 /**
  * Returns the an associative array keyed by columns for the given row.
  *
  * @param int $row
  * @return array
  */
 public function getRow($row)
 {
     $this->loadData();
     return parent::getRow($row);
 }