public getFirstRow ( ) : |
||
리턴 | The first row or `false` if it cannot be found. |
public function getFirstRow()
{
if (count($this->rows) == 0) {
if (!is_null($this->summaryRow)) {
return $this->summaryRow;
}
return false;
}
return reset($this->rows);
}
public function test_filter_shouldNotAppendAnything_IfNameToReplaceIsEmpty() { $columnNamesBefore = array('nb_visits', 'nb_conversions', 'revenue', 'conversion_rate'); $this->table->filter($this->filter, array('')); $this->table->filter($this->filter, array(null)); $this->table->filter($this->filter, array(false)); $columnNamesAfter = array_keys($this->table->getFirstRow()->getColumns()); $this->assertSame($columnNamesBefore, $columnNamesAfter); }