AbstractStorage.Class.php 739 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. namespace Mall\Framework\Cache;
  3. abstract class AbstractStorage implements StorageInterface
  4. {
  5. protected $prefix = 'mallguang::';
  6. protected $options = array();
  7. protected $ttl = 0;
  8. public function __construct($options = null)
  9. {
  10. if (!is_array($options)) {
  11. throw new \Exception('Cache options cannot be found');
  12. }
  13. $this->options = $options;
  14. $prefix = FALSE;
  15. if ($this->options['prefix']) {
  16. var_dump($this->options['prefix']);
  17. $prefix = str_replace(':', '', $this->options['prefix']) . ':';
  18. }
  19. $this->prefix = $prefix ?: $this->prefix;
  20. var_dump($this->prefix);
  21. }
  22. }