Download the PHP package koolreport/instant without Composer
On this page you can find all versions of the php package koolreport/instant. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download koolreport/instant
More information about koolreport/instant
Files in koolreport/instant
Package instant
Short Description Allow rendering widget instantly
License MIT
Homepage https://www.koolreport.com
Informations about the package instant
Introduction
Sometimes, we need to show some tables or charts in our page but setting up the whole KoolReport, despite of ease, causes trouble and is not convenient. The Instant
package allows us to create report or widget instantly everywhere without setting up a full report.
Beside Instant
package can help you to export any file whether it is html
or php
to PDF and other formats.
Installation
- Download and unzip the zipped file
- Copy
instant
folder intokoolreport\instant
folder
Documentation
Widget
name | return | description |
---|---|---|
create(string $widgetClassName, array $widgetParams) | null | Render the widget. This static function requires $widgetClassName which is the name of widget you want to create and $widgetParams which is any parameters you want to pass to the widget |
Examples
Create KoolPHP Table
Below are example of how to create Table on your PHP page
As you see, you do not need to setup the whole KoolReport class and the view in order to use our Widget
. With the Instance
package, you can create any widgets you want.
Create Google BarChart
Create PieChart
Assets Folder
Automatically create assets folder
By default, Instant package will create koolreport_assets
folder automatically to hold the resources of widgets. This will assure that all widgets work seamlessly.
Manually create assets folder
If you want to organize all koolreport widget's resources into a pre-created assets folder of your own, you may do so. For example, you have assets
folder created, you can do like below:
The third parameter of create
function is optional settings for assets folder. This assets
settings is necessary if browser can not access to the folder containing resources of Widget. By specifying the path
and url
, we let KoolReport know where to put Widget's resources and how to access those resources.
Turn off this feature
If you put KoolReport library in folder that can be accessed by browser, there will not be need for create assets
folder. So you may tell instant package not to create any assets
folder. Just input false
value into the third parameter like below
Exporter
Exporter
helps you to ulilize the Export
package (if you have) to export any HTML or PHP code file to PDF and other formats.
or you can save file
SinglePage
As you may know, to start a report, we normally need 3 files: a controller class file(ex.MyReport.php
), a view file (ex. MyReport.view.php
) and a initiation file (index.php
). The SinglePage
allows us to create report in just one file, bundling all the controller, view and initiation file into one. Please view below example:
As you may see from above example, we only have 1 file index.php
containing controller classes MyReport
and the view inside the start()
and end()
methods of report. We declare use \koolreport\instant\SinglePage;
inside MyReport
to provide two important methods above.
Support
Please use our forum if you need support, by this way other people can benefit as well. If the support request need privacy, you may send email to us at [email protected].