示例#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;
 }
示例#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();
 }
示例#3
0
 public function __construct(Backend $backend, $prefix)
 {
     parent::__construct($backend);
     $this->prefix = $prefix;
 }