1. Go to this page and download the library: Download ah-b/oil 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/ */
ah-b / oil example snippets
composer
$pipelineService = new OilService(new Pipeline());
$pipelineService->add(new Test());
$pipelineService->run('my payload');
class Test
{
public function __invoke($payload)
{
return $payload;
}
}
public function indexController()
{
$databaseRecord = "test";
if($databaseRecord == "test")
{
// do some logic
}
if($databaseRecord == "foo")
{
// do some logic
}
if($databaseRecord == "bar")
{
// do some logic
}
...
}
public function indexController()
{
$databaseRecord = "test";
$pipelineService = new OilService(new Pipeline());
$pipelineService->add(new Test());
$pipelineService->add(new Foo());
$pipelineService->add(new Bar());
$pipelineService->run($databaseRecord);
...
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.