コード例 #1
0
 /**
  * Construct AcquiaPurgeDiskStateStorage.
  *
  * @param string $uri
  *   The URI identifier to the file (on disk) to store state data in.
  */
 public function __construct($uri)
 {
     $this->uri = $uri;
     if (file_exists($this->uri)) {
         if ($buffer = file_get_contents($this->uri)) {
             if (parent::__construct(unserialize($buffer))) {
                 $this->raw = $buffer;
             }
         }
     }
 }
 /**
  * Construct AcquiaPurgeMemcachedStateStorage.
  *
  * @param string $key
  *   Memcached key used to store our state data in.
  * @param string $bin
  *   Memcached bin used to store our state data in memcached.
  */
 public function __construct($key, $bin)
 {
     $this->key = $key;
     $this->bin = $bin;
     parent::__construct(dmemcache_get($this->key, $this->bin));
 }