1. Go to this page and download the library: Download michaeljennings/utilities 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/ */
michaeljennings / utilities example snippets
// Item being refined
class ToRefine implements Michaeljennings\Broker\Contracts\Cacheable
{
/**
* Get the key to cache the attributes against.
*
* @return string
*/
public function getCacheKey()
{
return 'test';
}
/**
* Get the unique key for the cacheable item.
*
* @return int|string
*/
public function getKey()
{
return 1;
}
}
class Example extends Michaeljennings\Refinery\Refinery
{
use CachesTemplates;
public function setTemplate($item)
{
//
}
}