Download the PHP package lukaszmakuch/table-renderer without Composer
On this page you can find all versions of the php package lukaszmakuch/table-renderer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download lukaszmakuch/table-renderer
More information about lukaszmakuch/table-renderer
Files in lukaszmakuch/table-renderer
Package table-renderer
Short Description Allows to render tree structures as tables (e.g. HTML).
License MIT
Informations about the package table-renderer
Table renderer
Allows to render tree structures as tables.
HTML example
Click the image for more examples.
Trees
Elements
There are 3 main elements of every tree:
Atomic values
They are indivisible.
TextValue
It simply holds some text which will be rendered inside some cell.
Containers
They hold other elements.
HorizontalContainer
Its elements are on top of each other.
HorizontalContainer
Its elements are next to each other.
Building trees
It's possible to build a composite of any complexity.
Renderers
Allows to render tables based on tree structures.
HTMLRenderer
Renders HTML code.
Getting the renderer
Basic usage
Adding HTML attributes
It's possible to assign HTML attributes to atomic values as well as to a whole table. ObjectAttributeContainer is used to achieve that.
Building renderer with support of additional attributes
First, you need to build the renderer with some attribute container.
Adding attributes to a tree.
Support of custom atomic values
This renderer supports custom atomic values. A custom value should extend AtomicValueRenderer. Then you can register a new atomic value renderer like that:
ScalarRenderer
It renders models of tables as scalar values or arrays of scalar values (or other arrays).
Getting the renderer
Basic usage
Support of custom elements
This renderer supports custom elements. A custom element should extend ScalarRenderer. Then you can register a new element renderer like that:
Examples
Check examples in the examples directory
Installation
Use composer to get the latest version:
All versions of table-renderer with dependencies
lukaszmakuch/object-attribute-container Version ^0.1.0
lukaszmakuch/class-based-registry Version ^0.0.2
lukaszmakuch/property-setter Version ^0.2.0