Download the PHP package alius/tag without Composer

On this page you can find all versions of the php package alius/tag. 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 tag

Build Status

Alius Tag

It's just a simple class to create tags.

Basic usage

Use the render method or cast the class to string to get the html.

Methods

Attributes

object attr ( string $name, mixed $value = null )

Change the attribute. Chainable.

Preserves the original php type:

Html entities and double quotes are converted (only when rendered):

mixed getAttr ( string $name )

Get the attribute value.

bool hasAttr ( string $name )

True if the attribute exists. Even if it's empty.

object deleteAttr ( string $name )

Delete the attribute. Chainable.

string renderAttr ( string $name )

Get the attributes in string.

Content

object add ( mixed $value )

Add content. Chainable. The value is converted to string, null or empty string is skipped.

object setContent ( mixed $value )

Replaces the content. Chainable.

bool hasContent

True if there is some content.

object deleteContent

Delete the content. Chainable.

string renderContent

Get the content string.

Class

Helper methods for classes.

object addClass ( $values )

Add class(es). Chainable. Null and empty string skipped. You can pass an array or string. Don't worry about whitespaces.

object setClass ( $values )

Replace existing classes. Chainable. You can use it with the class pseudo method via __call:

array getClass ()

Get the classes.

bool hasClass ( $value )

True when the class is set.

object deleteClass ( $values )

Delete one class. Chainable. Deletes the class attribute when you delete the last class.

Data

Helper methods for data attributes.

object data ( $name, $value = null )

Set the data attribute. Chainable.

mixed getData ( $name )

Get the data value. Null if the data is not set.

bool hasData ( $name )

True if there is a data attribute with this name, even if it's empty.

object deleteData ( $name )

Delete the attribute.

Other

Non-existing methods are treated as attributes using the __call method:

You can use this class statically:

There is a general factory:

object make ( string $tag )

And there are some useful helper factories:

object form ( string $action, $method = 'post', $token = null )

If the form isn't get or post we change the method to post and add a _method hidden tag:

If you set the token we place a _token hidden tag:

object labelFor ( mixed $for, string $text = null )

You can add string or even an other tag:

object select ( string $name, array $options = [] )

Use it with option tags:

object div ( mixed $content = null )
object span ( mixed $content = null )
object a ( string $href, mixed $content = null )
object img ( string $src )
object caption ( mixed $text = null )
object input ( string $type, string $name, string $value = null )
object checkbox ( string $name, string $value = null, $checked = false )
object radio ( string $name, string $value = null, $checked = false )
object text ( string $name, string $value = null )
object password ( string $name )
object hidden ( string $name, string $value )
object option ( string $text, string $value = null, $selected = false )
object textarea ( string $name, string $value = null )

Hello World


All versions of tag with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5
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 alius/tag contains the following files

Loading the files please wait ....