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
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PhpXpress v1.0.1
|
* PhpXpress v1.0.2
|
||||||
*
|
*
|
||||||
* @see https://github.com/xfarrow/phpxpress The PhpXpress GitHub project
|
* @see https://github.com/xfarrow/phpxpress The PhpXpress GitHub project
|
||||||
*
|
*
|
||||||
@ -150,8 +150,10 @@
|
|||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function setDataSource(Array $dataSource){
|
function setDataSource(Array $dataSource){
|
||||||
if(empty($dataSource))
|
if(empty($dataSource)){
|
||||||
throw new InvalidArgumentException('Parameter cannot be empty.');
|
$this->dataSource = [];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(isset($this-> dataSource))
|
if(isset($this-> dataSource))
|
||||||
throw new BadFunctionCallException("Cannot add datasource to a Table already having a datasource");
|
throw new BadFunctionCallException("Cannot add datasource to a Table already having a datasource");
|
||||||
|
Reference in New Issue
Block a user