Exemple #1
0
 public function __construct(Backend $backend, $maxLength)
 {
     if ($maxLength < self::MD5_STRLEN) {
         throw new \InvalidArgumentException('Max length must be larger than ' . self::MD5_STRLEN);
     }
     parent::__construct($backend);
     $this->maxLength = $maxLength;
 }
Exemple #2
0
 public function __construct(Backend $backend, array $scopes = [])
 {
     parent::__construct($backend);
     foreach ($scopes as $scope) {
         if (!$scope instanceof Scope) {
             $type = is_object($scope) ? get_class($scope) : gettype($scope);
             throw new \InvalidArgumentException("Not an instance of Scope: {$type}");
         }
     }
     $this->scopes = $scopes;
     $this->sortScopes();
 }
Exemple #3
0
 public function __construct(Backend $backend, $prefix)
 {
     parent::__construct($backend);
     $this->prefix = $prefix;
 }