You are here

abstract class MessageArgumentsBase in Message 7

Contains \MessageArgumentsBase.

Hierarchy

Expanded class hierarchy of MessageArgumentsBase

File

includes/MessageArgumentsBase.php, line 7

View source
abstract class MessageArgumentsBase implements MessageArgumentInterface {

  /**
   * @var Message
   *
   * The message object.
   */
  protected $message;

  /**
   * {@inheritdoc}
   */
  public function getMessage() {
    return $this->message;
  }

  /**
   * {@inheritdoc}
   */
  public function setMessage(Message $message) {
    $this->message = $message;
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function getArguments() {
    $arguments = array();
    $callbacks = $this
      ->getNameArgument();
    foreach ($callbacks as $argument => $callback) {
      $arguments[$argument] = call_user_func($callback);
    }
    return $arguments;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
MessageArgumentInterface::getNameArgument public function The method return information about the arguments for the message and the callbacks which responsible to compute the argument value. 1
MessageArgumentsBase::$message protected property The message object.
MessageArgumentsBase::getArguments public function Retrieve the arguments info. Overrides MessageArgumentInterface::getArguments
MessageArgumentsBase::getMessage public function Overrides MessageArgumentInterface::getMessage
MessageArgumentsBase::setMessage public function Overrides MessageArgumentInterface::setMessage