1. Go to this page and download the library: Download ride/lib-common library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ride / lib-common example snippets
use ride\library\decorator\DateFormatDecorator;
use ride\library\decorator\StorageSizeDecorator;
use ride\library\decorator\VariableDecorator;
// decorate dates into a formatted date
$decorator = new DateFormatDecorator();
$decorator->setDateFormat('y-m-d');
$result = $decorator->decorate(1372582573); // 2013-06-30
$result = $decorator->decorate(new DateTime('30 June 2013')); // 2013-06-30
// decorate byte values into human readable format
$decorator = new StorageSizeDecorator();
$result = $decorator->decorate(5000); // 4.88 Kb
// decorate variables into a output string
$decorator = new VariableDecorator();
$result = $decorator->decorate(null); // 'null'
$result = $decorator->decorate(true); // 'true'
$result = $decorator->decorate(array('key' => 'value')); // '["key" => "value"]'
$result = $decorator->decorate($decorator); // 'ride\library\decorator\VariableDecorator'
use ride\library\Autoloader;
use ride\library\StringHelper;
e1/src');
$autoloader->addIncludePath('module2/src');
$autoloader->addIncludePath('application/src'); // last added path will be checked first
$autoloader->registerAutoloader();
// go and use some classes
$string = StringHelper::generate();
use ride\library\Timer;
$timer = new Timer();
$timer->reset();
$time = $timer->getTime(); // get the current time and keep on going
$time = $timer->getTime(true); // get the current time and reset
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.