mirror of https://github.com/xfarrow/phpxpress.git
Update Table.php
This commit is contained in:
parent
12c171577d
commit
7b481afe26
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* PhpXpress v1.0.2
|
||||
* PhpXpress v1.0.3
|
||||
*
|
||||
* @see https://github.com/xfarrow/phpxpress The PhpXpress GitHub project
|
||||
*
|
||||
|
@ -150,15 +150,14 @@
|
|||
* @return void
|
||||
*/
|
||||
function setDataSource(Array $dataSource){
|
||||
if(isset($this-> dataSource))
|
||||
throw new BadFunctionCallException("Cannot add datasource to a Table already having a datasource");
|
||||
|
||||
if(empty($dataSource)){
|
||||
$this->dataSource = [];
|
||||
return;
|
||||
}
|
||||
|
||||
if(isset($this-> dataSource))
|
||||
throw new BadFunctionCallException("Cannot add datasource to a Table already having a datasource");
|
||||
|
||||
|
||||
$is_array_of_arrays; // if false, the datasource is an array of object(s)
|
||||
if(is_object($dataSource[0])){
|
||||
$is_array_of_arrays = false;
|
||||
|
|
Loading…
Reference in New Issue