public static function getRowInstance($row) {
		if (is_array($row)) {
			return new \Aginev\Datagrid\Rows\ArrayRow($row);
		} else if ($row instanceof Model) {
			return new \Aginev\Datagrid\Rows\ModelRow($row);
		} else if ($row instanceof Collection) {
			return new \Aginev\Datagrid\Rows\CollectionRow($row);
		} else if (is_object($row)) {
			return new \Aginev\Datagrid\Rows\ObjectRow($row);
		}

		throw new CellException('Unsupported data!');
	}
public static function getRowInstance($row) {
		if (is_array($row)) {
			return new \Aginev\Datagrid\Rows\ArrayRow($row);
		} else if ($row instanceof Model) {
			return new \Aginev\Datagrid\Rows\ModelRow($row);
		} else if ($row instanceof Collection) {
			return new \Aginev\Datagrid\Rows\CollectionRow($row);
		} else if (is_object($row)) {
			return new \Aginev\Datagrid\Rows\ObjectRow($row);
		}

		throw new CellException('Unsupported data!');
	}
public static function getRowInstance ( $ row ) { if ( is_array ( $ row ) ) { return new \ Aginev \ Datagrid \ Rows \ ArrayRow ( $ row ) ; } else if ( $ row instanceof Model ) { return new \ Aginev \ Datagrid \ Rows \ ModelRow ( $ row ) ; } else if ( $ row instanceof Collection ) { return new \ Aginev \ Datagrid \ Rows \ CollectionRow ( $ row ) ; } else if ( is_object ( $ row ) ) { return new \ Aginev \ Datagrid \ Rows \ ObjectRow ( $ row ) ; } throw new CellException ( 'Unsupported data!' ) ; }
Get row instance based on the data type

@param $row

@return Collection
@throws CellException
Get row instance based on the data type