Guest User

Untitled

a guest
Oct 19th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. module.config.php
  2.  
  3. return array(
  4. 'di' => array(
  5. 'definition' => array(
  6. 'class' => array(
  7. 'Genio\Cache' => array(
  8. 'setFileSystem' => array(
  9. 'cacheObject' => array(
  10. 'type' => 'Genio\Cache\Mem',
  11. 'required' => true
  12. )
  13. )
  14. )
  15. )
  16. ),
  17. );
  18.  
  19.  
  20. Genio\Cache.php
  21.  
  22. <?php
  23.  
  24. namespace Genio;
  25.  
  26. use Genio\Exceptions\RuntimeException,
  27. Genio\Cache\MemCached;
  28.  
  29. class Cache
  30. {
  31.  
  32.  
  33. /**
  34. * Constructor
  35. *
  36. * @param \Genio\Cache $cacheObject Caching object (default null)
  37. */
  38. public function __construct(\Genio\Cache $cacheObject = null)
  39. {
  40.  
  41. // Check if cache object not exist
  42. if (is_null($cacheObject)) {
  43.  
  44. // Set default cache object
  45. //$cacheObject = new MemCached();
  46.  
  47. }
  48.  
  49. //var_dump($cacheObject);exit;
  50.  
  51. // Set cache object
  52. $this->_cacheObject = $cacheObject;
  53.  
  54. }
Add Comment
Please, Sign In to add comment