123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246 |
- <?php
- namespace AlibabaCloud\Client\Request\Traits;
- use AlibabaCloud\Client\Exception\ClientException;
- use RuntimeException;
- use AlibabaCloud\Client\Request\Request;
- /**
- * @package AlibabaCloud\Client\Request\Traits
- *
- * @mixin Request
- */
- trait DeprecatedTrait
- {
- /**
- * @param $content
- *
- * @return $this
- * @throws ClientException
- * @deprecated
- * @codeCoverageIgnore
- */
- public function setContent($content)
- {
- return $this->body($content);
- }
- /**
- * @param $method
- *
- * @return $this
- * @throws ClientException
- * @deprecated
- * @codeCoverageIgnore
- */
- public function setMethod($method)
- {
- return $this->method($method);
- }
- /**
- * @param $scheme
- *
- * @return $this
- * @throws ClientException
- * @deprecated
- * @codeCoverageIgnore
- */
- public function setProtocol($scheme)
- {
- return $this->scheme($scheme);
- }
- /**
- * @deprecated
- * @codeCoverageIgnore
- */
- public function getProtocolType()
- {
- return $this->uri->getScheme();
- }
- /**
- * @param $scheme
- *
- * @return $this
- * @throws ClientException
- * @deprecated
- * @codeCoverageIgnore
- */
- public function setProtocolType($scheme)
- {
- return $this->scheme($scheme);
- }
- /**
- * @param $actionName
- *
- * @return $this
- * @throws ClientException
- * @deprecated
- * @codeCoverageIgnore
- */
- public function setActionName($actionName)
- {
- return $this->action($actionName);
- }
- /**
- * @param $format
- *
- * @return $this
- * @throws ClientException
- * @deprecated
- * @codeCoverageIgnore
- */
- public function setAcceptFormat($format)
- {
- return $this->format($format);
- }
- /**
- * @deprecated
- * @codeCoverageIgnore
- */
- public function getProtocol()
- {
- return $this->uri->getScheme();
- }
- /**
- * @deprecated
- * @codeCoverageIgnore
- */
- public function getContent()
- {
- return isset($this->options['body'])
- ? $this->options['body']
- : null;
- }
- /**
- * @deprecated
- * @codeCoverageIgnore
- */
- public function getMethod()
- {
- return $this->method;
- }
- /**
- * @deprecated
- * @codeCoverageIgnore
- */
- public function getHeaders()
- {
- return isset($this->options['headers'])
- ? $this->options['headers']
- : [];
- }
- /**
- * @param $headerKey
- * @param $headerValue
- *
- * @return $this
- * @deprecated
- * @codeCoverageIgnore
- */
- public function addHeader($headerKey, $headerValue)
- {
- $this->options['headers'][$headerKey] = $headerValue;
- return $this;
- }
- /**
- * @deprecated
- * @codeCoverageIgnore
- */
- public function getQueryParameters()
- {
- return isset($this->options['query'])
- ? $this->options['query']
- : [];
- }
- /**
- * @param $name
- * @param $value
- *
- * @return $this
- * @deprecated
- * @codeCoverageIgnore
- */
- public function setQueryParameters($name, $value)
- {
- $this->options['query'][$name] = $value;
- return $this;
- }
- /**
- * @deprecated
- * @codeCoverageIgnore
- */
- public function getDomainParameter()
- {
- return isset($this->options['form_params'])
- ? $this->options['form_params']
- : [];
- }
- /**
- * @param $name
- * @param $value
- *
- * @return $this
- * @deprecated
- * @codeCoverageIgnore
- */
- public function putDomainParameters($name, $value)
- {
- $this->options['form_params'][$name] = $value;
- return $this;
- }
- /**
- * @deprecated
- * @codeCoverageIgnore
- */
- public function getActionName()
- {
- return $this->action;
- }
- /**
- * @deprecated
- * @codeCoverageIgnore
- */
- public function getAcceptFormat()
- {
- return $this->format;
- }
- /**
- * @deprecated
- * @codeCoverageIgnore
- */
- public function getLocationEndpointType()
- {
- return $this->endpointType;
- }
- /**
- * @deprecated
- * @codeCoverageIgnore
- */
- public function getLocationServiceCode()
- {
- return $this->serviceCode;
- }
- }
|