PHPUnit_Extensions_Database_DataSet_AbstractTable::getValue PHP Method

getValue() public method

Returns the value for the given column on the given row.
public getValue ( integer $row, integer $column )
$row integer
$column integer
    public function getValue($row, $column)
    {
        if (isset($this->data[$row][$column])) {
            return (string) $this->data[$row][$column];
        } else {
            if (!in_array($column, $this->getTableMetaData()->getColumns()) || $this->getRowCount() <= $row) {
                throw new InvalidArgumentException("The given row ({$row}) and column ({$column}) do not exist in table {$this->getTableMetaData()->getTableName()}");
            } else {
                return NULL;
            }
        }
    }

Usage Example

Esempio n. 1
0
 /**
  * Returns the value for the given column on the given row.
  *
  * @param int $row
  * @param int $column
  */
 public function getValue($row, $column)
 {
     $this->loadData();
     return parent::getValue($row, $column);
 }