You are here

public function SmsMessage::getOption in SMS Framework 8

Same name in this branch
  1. 8 src/Message/SmsMessage.php \Drupal\sms\Message\SmsMessage::getOption()
  2. 8 src/Entity/SmsMessage.php \Drupal\sms\Entity\SmsMessage::getOption()
Same name and namespace in other branches
  1. 2.x src/Message/SmsMessage.php \Drupal\sms\Message\SmsMessage::getOption()
  2. 2.1.x src/Message/SmsMessage.php \Drupal\sms\Message\SmsMessage::getOption()

Gets the option specified by the key $name.

Parameters

string $name: The name of the option.

Return value

mixed Get the value of the option.

Overrides SmsMessageInterface::getOption

File

src/Message/SmsMessage.php, line 244

Class

SmsMessage
Basic implementation of an SMS message.

Namespace

Drupal\sms\Message

Code

public function getOption($name) {
  if (array_key_exists($name, $this->options)) {
    return $this->options[$name];
  }
  return NULL;
}