Php library

Various library classes that are required for various projects.

View the Project on GitHub calebjonasson/PHP_Library

PHP_Library

Various library classes that are required for various projects.

Html

This class is not completed as some tags have not been properly updated to use the Html::tag() method.

The Html class allows a static way of adding html to a view. ex:

Html::p("This is a test.");
<p>This is a test.</p>

It also allows us to create tags with id's and classes as well.

Html::p("cats are not cool, bow-ties are cool", "p-blue", "top-desc");
<p class="p-blue" id="top-desc">cats are not cool, bow-ties are cool</p>

If you would like to add your own non supported tags...

Html::tag("canvas", null, array('id' => 'canvas'));
<canvas id="canvas" />

Ip

The Ip class is used for all things relating to IPs. Some additions that should be added are:

  1. Formatting
  2. explode into parts ie: path, port
  3. return details in StdClass

Example of getting the ip address from super global server.

Ip::get();
24.182.18.299

Contact me @_jonasson