mirror of
https://github.com/xfarrow/phpxpress.git
synced 2025-06-05 21:59:21 +02:00
Update Table.php
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user