protected function getContext($options) { $context = new ExecutionContext(); $context->setCredentials(array(OSSOptions::ACCESS_KEY_ID => $options[OSSOptions::ACCESS_KEY_ID], OSSOptions::ACCESS_KEY_SECRET => $options[OSSOptions::ACCESS_KEY_SECRET])); $context->setResponseHandler($this->getResponseHandlers($options)); $bucket = isset($options[OSSOptions::BUCKET]) ? $options[OSSOptions::BUCKET] : null; $key = isset($options[OSSOptions::KEY]) ? $options[OSSOptions::KEY] : null; $context->setSigner(new OSSRequestSigner($bucket, $key)); $context->setParameter('Command', $this->getCommandName()); return $context; }