Download the PHP package phacil/html without Composer

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

HTML

HTML class is a component of Phacil PHP Framework

Instalation

Download zip from https://github.com/phacil/html, unzip file and use composer update inside folder

Now you can use the static methods to write HTML tags and its attributes in chain mode.

Loading HTML Class

<?php
include 'vendor/autoload.php';
use Phacil\Component\HTML\HTML;

Writing Elements

/* You can echo this code */
echo HTML::h1('This is a title');
/* or call output() function */
HTML::h2('This is a second title')->output();
/* and use chain mode to set attributes */
echo HTML::a('A link to google.com')->href('http:://google.com.br')->class('link');

Start a block

echo HTML::begin('div')->class('block')->id('content');
echo HTML::p(There is some content);
echo HTML::end('div');
/* or */
echo HTML::div(function(){
    echo HTML::p(There is some content);
})->class('block')->id('content');
/* or */    
echo HTML::div([
    HTML::p(There is some content),
HTML::p(Another content)
]);

Especial Tags Function

You can write any tag with same structure shown above, except these guys:

/* Let's use this list */
$list = ["1"=>"First","Second","Third"];

Select

echo HTML::select($list, "2", $empty="Position")->id("select")->name("select");

Radio

echo HTML::radio($list, "2")->id("radios")->name("radios")->class("hotizontal");

Checkbox

echo HTML::checkbox($list, ["1" , "2"])->id("checkbox")->name("checkbox")->class("hotizontal");

Style

Now, we gonna write some CSS. This code:

$style = ['.btn-group' => [
               ' .btn'=> [                    
                        'color'=>'#ccc',
                        'padding'=>'0',
                        '.primary'=>[
                                    'color'=>'#08c',
                                    '.active'=>['color'=>'#08c'],
                        ],
                        '.danger'=>['color'=>'#F66']
                ],
            ],
        ];
echo HTML::style($style)

Out this:

<style>
     .btn-group{
      }
     .btn-group .btn{
          color:#ccc;
          padding:0;
      }
     .btn-group .btn.primary{
          color:#08c;
      }
     .btn-group .btn.primary.active{
          color:#081;
      }
     .btn-group .btn.danger{
          color:#08c;
      }
</style>

All versions of html with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4
icanboogie/inflector Version ^1.4
phacil/common Version ^1.3
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 phacil/html contains the following files

Loading the files please wait ....