/** * Overloads default class properties from the options. * * Any of the provider options can be set here: * * Type | Option | Description | Default Value * ----------|---------------|------------------------------------------------|----------------- * mixed | signature | Signature method name or object | provider default * * @param array provider options * @return void */ public function __construct(array $options = null) { if (isset($options['signature'])) { // Set the signature method name or object $this->signature = $options['signature']; } if (!is_object($this->signature)) { // Convert the signature name into an object $this->signature = Signature::make($this->signature); } }
/** * Sign the request, setting the `oauth_signature_method` and * `oauth_signature`. * * @param Signature signature * @param Consumer consumer * @param Token token * @return $this * @uses Signature::sign */ public function sign(Signature $signature, Consumer $consumer, Token $token = null) { // Create a new signature class from the method $this->param('oauth_signature_method', $signature->name); // Sign the request using the consumer and token $this->param('oauth_signature', $signature->sign($this, $consumer, $token)); return $this; }