Download the PHP package tobento/service-table without Composer

On this page you can find all versions of the php package tobento/service-table. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package service-table

Table Service

The Table Service provides a way for building tables easily.

Table of Contents

Getting started

Add the latest version of the Table service project running this command.

Requirements

Highlights

Screenshots


Simple Example

Render the table

Both tables from above will produce the following output

Documentation

Create Table

With Methods

You might change some data or implentation by the following "with methods" returning a new instance.

withColumns

withRenderer

Create Rows

Creating rows from array items

Using a callback for creating rows

You may use a callback for creating rows if you provide an array of objects for instance or want to create only specific row columns.

Create only specific row columns from an array of items:

Create Row

Creating a row from an array

Using a callback for creating row columns

You may use a callback for creating row columns if you provide an object.

Row Methods

Heading

You may mark the row as a heading.

Id

You may give the row an id to fetch it later.

Each

You may use the each method to create the row columns.

When

The when method will execute the given callback when the first argument given to the method evaluates to true.

Html

You may mark columns as html, indicating that no escaping is done.

PependHtml / AppendHtml

You may prepend and append html to the row.

Column

You may use the column method to add a column.

Custom Row

You may use the addRow method to pass a custom row.

Table Attributes

You may set table attributes which will be rendered depending on the renderer.

Render Table

There are different ways of rendering the table depending on your needs.

Default Renderer

The default renderer generates the table using elements and calculates the columns size automatically.

Outputs:

Table Renderer

The table renderer generates the table using the HTML element.

Outputs:

The and methods will be ignored as it would produce invalid HTML!

Custom Renderer

You might write your own renderer fitting your application.

Credits


All versions of service-table with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
tobento/service-tag Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package tobento/service-table contains the following files

Loading the files please wait ....