Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module.config.php
- return array(
- 'di' => array(
- 'definition' => array(
- 'class' => array(
- 'Genio\Cache' => array(
- 'setFileSystem' => array(
- 'cacheObject' => array(
- 'type' => 'Genio\Cache\Mem',
- 'required' => true
- )
- )
- )
- )
- ),
- );
- Genio\Cache.php
- <?php
- namespace Genio;
- use Genio\Exceptions\RuntimeException,
- Genio\Cache\MemCached;
- class Cache
- {
- /**
- * Constructor
- *
- * @param \Genio\Cache $cacheObject Caching object (default null)
- */
- public function __construct(\Genio\Cache $cacheObject = null)
- {
- // Check if cache object not exist
- if (is_null($cacheObject)) {
- // Set default cache object
- //$cacheObject = new MemCached();
- }
- //var_dump($cacheObject);exit;
- // Set cache object
- $this->_cacheObject = $cacheObject;
- }
Add Comment
Please, Sign In to add comment