mirror of https://github.com/xfarrow/phpxpress.git
bugfix
This commit is contained in:
parent
7b481afe26
commit
927250f83f
|
@ -1,6 +1,6 @@
|
|||
# phpxpress
|
||||
|
||||
PhpXpress' goal is to create a simple way to programmatically manage Bootstrap elements.
|
||||
PhpXpress' goal is to create a simple way to programmatically manage Bootstrap elements.
|
||||
It's similar to Microsoft's WebForms with a great layout by default (like DevExpress).
|
||||
|
||||
|
||||
|
@ -21,7 +21,7 @@ The following code
|
|||
```
|
||||
$employees = array($employee1, $employee2, $employee3);
|
||||
|
||||
$table = new Table;
|
||||
$table = new PhpXpress\Table;
|
||||
$table->setDataSource($employees);
|
||||
|
||||
$table->setCustomCaptions(array("Name", "Surname", "Date of Birth", "Social Security Number")); //not required. If not specified it'll use objects' property names
|
||||
|
@ -132,7 +132,3 @@ The follwing code
|
|||
Produces the following output:
|
||||
|
||||
<img src="/examples/images/breadcrumb.jpg" alt="Demo">
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@
|
|||
function draw(){
|
||||
|
||||
if(!isset($this->dataSource)){
|
||||
throw new BadFunctionCallException('Error: dataSource not set.');
|
||||
throw new BadFunctionCallException('Error: datasource not set.');
|
||||
}
|
||||
|
||||
$tableClass = "table";
|
||||
|
@ -227,7 +227,7 @@
|
|||
function setCustomCaptions(Array $captions){
|
||||
|
||||
if(empty($this->dataSource))
|
||||
throw new BadFunctionCallException('Before setting Custom captions, a datasource must be provided first.');
|
||||
throw new BadFunctionCallException('Before setting Custom captions, a non empty datasource must be provided first.');
|
||||
|
||||
$provided = count($captions);
|
||||
$expected = count($this->columnCaptions);
|
||||
|
@ -275,8 +275,8 @@
|
|||
*/
|
||||
function invisible_column($column_name){
|
||||
|
||||
if(!isset($this->dataSource))
|
||||
throw new BadFunctionCallException('Unable to call invisible_column() if the datasource is not set');
|
||||
if(!isset($this->dataSource) || empty($this->dataSource))
|
||||
throw new BadFunctionCallException('Unable to call invisible_column() if the datasource is not set or empty.');
|
||||
|
||||
if(is_array($this->dataSource[0])){
|
||||
$array_keys = array_keys($this -> dataSource[0]);
|
||||
|
|
Loading…
Reference in New Issue