0.7.0: Add PHP binding
Added the PHP module with comparable functionality to the C API, complete with documentation and a comprehensive set of unit tests which is an extended subset of C unit tests ported to PHP.
The PHP module includes an RLIB compatibility API.
C API changes:
- Added
ocrpt_version()
- Array and file based input driver extensions to facilitate using them in the PHP binding
- Added new API functions so event callbacks may be added in the global context (i.e. using
opencreport *
pointer) instead of child element (e.g. part, report) context. Such event callbacks apply to every element of the same type. E.g. a "report start" event callback will be called for every report in a multi-report report. This is needed to implement better RLIB compatibility PHP API. The previously existing callback API functions work on individual elements.
<field>
and <literal>
nodes in the XML DTD are equivalent. The API also reflects this.
Code portability updates, memory leak fixes.
Output generation changes:
- All expressions may reference query columns. The use case is that supplementary queries with single row data sets may be used to set global options that may not refer to report variables or queries used by reports. For example, a
<Part>
node is in a higher scope outside<Report>
. As such, the part configuration options may not refer report related identifiers. E.g.<Part suppress="config.suppress">
would be set from a column calledsuppress
of a query calledconfig
, using the query's first data row. - The above also applies to
<load ...>
nodes to load<Report>
nodes from files. - Page headers are rendered at the start of rendering a page. This allows using the query data row valid for the beginning of the page. Previously, page headers and page footers were rendered at the end of rendering a page.
Report related changes:
- Added a new function called
prevval()
which takes an expression. It returns the value of the expression from the previous data row. It may be used to implement "data transferred from the previous page" in the header of the current page. - For single
<Report>
reports, the page header and footer may be associated with the the implicitly created<Part>
. It is done automatically if the report layout is parsed from an XML description. - Implemented
headernewpage
andsuppressblank
for<Break>
s.
Invalid identifier names in expressions are converted to strings automatically now. This will show up in report outputs allowing fixing typos more easily.
Rewritten documentation generation to use xsltproc
and fop
Miscellaneous fixes.