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
|
<?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
|
||||||
*
|
*
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE.
|
* FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
*/
|
*/
|
||||||
namespace PhpXpress;
|
namespace PhpXpress;
|
||||||
|
|
||||||
class Table{
|
class Table{
|
||||||
|
|
||||||
/* === Structure === */
|
/* === Structure === */
|
||||||
|
@ -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");
|
||||||
|
|
Loading…
Reference in New Issue