mirror of https://github.com/xfarrow/phpxpress.git
Update Table.php
This commit is contained in:
parent
fcc6c153e8
commit
12c171577d
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* PhpXpress v1.0.1
|
||||
* PhpXpress v1.0.2
|
||||
*
|
||||
* @see https://github.com/xfarrow/phpxpress The PhpXpress GitHub project
|
||||
*
|
||||
|
@ -150,8 +150,10 @@
|
|||
* @return void
|
||||
*/
|
||||
function setDataSource(Array $dataSource){
|
||||
if(empty($dataSource))
|
||||
throw new InvalidArgumentException('Parameter cannot be empty.');
|
||||
if(empty($dataSource)){
|
||||
$this->dataSource = [];
|
||||
return;
|
||||
}
|
||||
|
||||
if(isset($this-> dataSource))
|
||||
throw new BadFunctionCallException("Cannot add datasource to a Table already having a datasource");
|
||||
|
|
Loading…
Reference in New Issue