Download the PHP package kabachello/phpolapi without Composer
On this page you can find all versions of the php package kabachello/phpolapi. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download kabachello/phpolapi
More information about kabachello/phpolapi
Files in kabachello/phpolapi
Package phpolapi
Short Description A PHP API for XMLA to connect to OLAP databases
License MIT
Informations about the package phpolapi
phpOLAPi - connect to OLAP databases via XMLA
Features:
- execute MDX statements over XMLA
- use result data in PHP as an associative array
- transform the result into other structures via plug-in renderers: e.g. an HTML table, CSV, etc.
- create MDX queries in OOP-style via MDX query builder
- explore database schemas (cubes, dimensions, hierarchies, levels, ...).
phpOLAPi is a fork of phpOLAP by Julien Jacottet, which is unfortunately not maintained anymore.
Install
phpOLAPi runs on PHP 5.3.2 and above.
Connect
NOTE: Before you start, make sure, your database provides an XMLA webservice. Some OLAP enginges (like Mondrian) work with XMLA out of the box, while others require additional actions to be performed - for example, here are the official instructions to add an XMLA webservice to Microsoft Analysis Services.
Run an MDX query
Build an MDX query via API
Use ResultSet renderers
The result of a query is a ResultSet
instance, which mimics the (very complex) structure of an XMLA response. Renderers help extract the actual data, which is burried deep in the XML. In the first example above we used the AssocArrayRenderer
to transform the ResultSet
into an associative array. But there are also other renderers and you can also build your own!
Database exploration
License
phpOLAPi is released under the MIT license.