示例#1
0
 public function setResourcePath($resourcePath)
 {
     AssertUtils::assertString($resourcePath, 'resourcePath');
     AssertUtils::assertNotEmpty($resourcePath, 'resourcePath');
     if (substr($resourcePath, 0, 1) != '/') {
         throw new \InvalidArgumentException('Resource path must start with /');
     }
     $this->resourcePath = $resourcePath;
 }
示例#2
0
 public function computeSignature($key, $data)
 {
     AssertUtils::assertNotEmpty($key, 'key');
     AssertUtils::assertNotEmpty($data, 'data');
     return $this->computeSignatureCore($key, $data);
 }