Client Bundle

Browser

Detect the browser name:

$browser = new Client\Browser(Request $request);
$browser->getOutput();

Desktop

Detect the desktop device:

$desktop = new Client\Desktop(Request $request);
$desktop->getOutput();

Engine

Detect the browser engine:

$engine = new Client\Engine(Request $request);
$engine->getOutput();

Mobile

Detect the mobile device:

$mobile = new Client\Mobile(Request $request);
$mobile->getOutput();

Tablet

Detect the tablet device:

$tablet = new Client\Tablet(Request $request);
$tablet->getOutput();

Version

Detect the browser version:

$version = new Client\Version(Request $request);
$version->getOutput();
Edit on GitHub

Config Class

Get instance

Get the instance of the Config class:

$config = Config::getInstance();

Clear instance

Clear the instance of the Config class:

$config->clearInstance();

Init

Init the class:

$config->init(string $configFile);

Get

Get item from config:

$config->get(string $key);

Set

Set item to config:

$config->set(string $key, string $value);

Parse

Parse from database url:

$config->parse(string $dbUrl);

Write

Write config to file:

$config->write();

Clear

Clear the config:

$config->clear();
Edit on GitHub

Db Class

Create object

Utilize the constructor of the Db class:

Db::construct(Config $config);

Init

Init the class:

Db::init();

Get status

Get the database status:

Db::getStatus();

Raw instance

Raw instance helper:

Db::rawInstance();

Count table prefix

Count table with prefix:

Db::countTablePrefix();

For table prefix

For table with prefix:

Db::forTablePrefix(string $table, string $connection);

Left join prefix

Left join with prefix:

Db::leftJoinPrefix(string $table, string $constraint, string $tableAlias);

Where like many

Where like with many:

Db::whereLikeMany(array $columnArray, array $likeArray);

Where language is

Where language is:

Db::whereLanguageIs(string language);

Find flat array

Find a flat array:

Db::findFlatArray(string $key);

Get setting

Get the setting:

Db::getSetting(string $key);

Set setting

Set the setting:

Db::setSetting(string $key, string $value);

Order global

Order according to settings:

Db::orderGlobal(string $column);

Limit global

Limit according to settings:

Db::limitGlobal();
Edit on GitHub

Element Class

Create object

Create a object of the Html\Element class:

$element = new Html\Element();

Init

Init the class:

$element->init(string $tag, array $attributeArray);

Copy

Copy the element:

$element->copy();

Attribute

Set attribute to the element:

$element->attr(mixed $attribute, string $value);

Remove attribute from the element:

$element->removeAttr(string $attribute);

Class

Add class to the element:

$element->addClass(string $className);

Remove class from the element:

$element->removeClass(string $className);

Val

Set value to the element:

$element->val(string $value);

Text

Set text to the element:

$element->text(string $text);

Html

Set HTML to the element:

$element->html(string $html);

Append

Append HTML to the element:

$element->append(string $html);

Prepend

Prepend HTML to the element:

$element->prepend(string $html);

Clear

Clear HTML of the element:

$element->clear();

Render

Render the element:

$element->render();

Stringify the element:

echo $element;
Edit on GitHub

Filter Bundle

Alias

Filter the alias:

$filter = new Filter\Alias();
$filter->sanitize(string $alias);

Boolean

Filter the boolean:

$filter = new Filter\Boolean();
$filter->sanitize(string $boolean);

Email

Filter the email:

$filter = new Filter\Email();
$filter->sanitize(string $email);

HTML

Filter the HTML:

$filter = new Filter\Html();
$filter->sanitize(string $html, boolean $filter);

Path

Filter the path:

$filter = new Filter\Path();
$filter->sanitize(string $path);

Special

Filter the special:

$filter = new Filter\Special();
$filter->sanitize(string $special);

URL

Filter the URL:

$filter = new Filter\Url();
$filter->sanitize(string $url);
Edit on GitHub

Form Class

Create object

Create a object of the Html\Form class:

$form = new Html\Form(Registry $registry, Language $language);

Init

Init the class:

$form->init(array $attributeArray, array $optionArray);

Legend

Append the legend:

$form->legend(string $html, array $attributeArray);

Label

Append the label:

$form->label(string $html, array $attributeArray);

Input

Append the color:

$form->color(array $attributeArray);

Append the checkbox:

$form->checkbox(array $attributeArray);

Append the date:

$form->date(array $attributeArray);

Append the datetime:

$form->datetime(array $attributeArray);

Append the email:

$form->email(array $attributeArray);

Append the file:

$form->file(array $attributeArray);

Append the hidden:

$form->hidden(array $attributeArray);

Append the number:

$form->number(array $attributeArray);

Append the password:

$form->password(array $attributeArray);

Append the radio:

$form->radio(array $attributeArray);

Append the range:

$form->range(array $attributeArray);

Append the search:

$form->search(array $attributeArray);

Append the time:

$form->time(array $attributeArray);

Append the tel:

$form->tel(array $attributeArray);

Append the text:

$form->text(array $attributeArray);

Append the url:

$form->url(array $attributeArray);

Append the week:

$form->week(array $attributeArray);

Textarea

Append the textarea:

$form->textarea(array $attributeArray);

Select

Append the select:

$form->select(array $valueArray, array $attributeArray);

Select range

Append the select range:

$form->selectRange(array $rangeArray, array $attributeArray);

Captcha

Append the captcha:

$form->captcha(string $type);

Token

Append the token:

$form->token();

Button

Append the button:

$form->button(string $text, array $attributeArray);

Append the submit:

$form->submit(string $text, array $attributeArray);

Append the reset:

$form->reset(string $text, array $attributeArray);

Html

Set HTML to the form:

$form->html(string $html);

Append

Append HTML to the form:

$form->append(string $html);

Prepend

Prepend HTML to the form:

$form->prepend(string $html);

Clear

Clear HTML of the form:

$form->clear();

Render

Render the form:

$form->render();

Stringify the form:

echo $form;
Edit on GitHub

Installer Class

Create object

Create a object of the Installer class:

$installer = new Installer(Registry $registry, Request $request, Language $language, Config $config);

Init

Init the class:

$installer->init(string $directory);

Raw create

Create from sql database/{db-type}/create files:

$installer->rawCreate();

Raw drop

Drop from sql database/{db-type}/drop files:

$installer->rawDrop();

Insert data

Insert the data:

$installer->insertData(array $optionArray);
Edit on GitHub

Language Class

Get instance

Get the instance of the Language class:

$language = Language::getInstance();

Init

Init the class:

$language->init(string $language);

Get

Get item from language:

$language->get(string $key, string $index);

Set

Set item to language:

$language->set(string $key, mixed $value);

Load

Load from language path:

$language->load(mixed path);

Clear instance

Clear the instance of the Language class:

$language->clearInstance();
Edit on GitHub

Registry Class

Get instance

Get the instance of the Registry class:

$registry = Registry::getInstance();

Clear instance

Clear the instance of the Registry class:

$registry->clearInstance();

Init

Init the class:

$registry->init(array $registryArray);

Get

Get item from registry:

$registry->get(string $key);

Set

Set item to registry:

$registry->get(string $key, string $value);
Edit on GitHub

Request Class

Get instance

Get the instance of the Request class:

$request = Request::getInstance();

Clear instance

Clear the instance of the Request class:

$request->clearInstance();

Init

Init the class:

$request->init();

Globals

Get item from globals:

$request->get(string $key, string $index);

Set item to globals:

$request->set(string $key, mixed $value);

Server

Get item from server:

$request->getServer(string $key);

Set item to server:

$request->setServer(string $key, mixed $value);

Query

Get item from query:

$request->getQuery(string $key);

Set item to query:

$request->setQuery(string $key, mixed $value);

Post

Get item from post:

$request->getPost(string $key);

Set item to post:

$request->setPost(string $key, mixed $value);

Files

Get item from files:

$request->getFiles(string $key);

Set item to files:

$request->setFiles(string $key, mixed $value);

Session

Get item from session:

$request->getSession(string $key);

Set item to session:

$request->setSession(string $key, mixed $value);

Refresh the session:

$request->refreshSession();

Cookie

Get item from cookie:

$request->getCookie(string $key);

Set item to cookie:

$request->setCookie(string $key, mixed $value);

Refresh the cookie:

$request->refreshCookie();
Edit on GitHub