You are here

class ServicesClientMappingValue in Services Client 7.2

Value description that is returned from Reader.

Hierarchy

Expanded class hierarchy of ServicesClientMappingValue

1 string reference to 'ServicesClientMappingValue'
ServicesClientPluginsTestCase::testServicesClientPropertyReader in tests/plugin.test

File

include/mapping.inc, line 49

View source
class ServicesClientMappingValue {

  /**
   * Value gathered by reader.
   *
   * @var array
   */
  protected $value;

  /**
   * Flag that holds empty/not empty information.
   *
   * @var bool
   */
  protected $empty;

  /**
   * Constructor.
   *
   * @param array $value
   *   Value that should be carried.
   */
  public function __construct($value = array()) {
    $this->value = $value;
    $this->empty = FALSE;
  }

  /**
   * Set value data.
   *
   * @param array $value
   *   List of values gathered by reader.
   * @return self
   */
  public function setValue($value) {
    $this->value = $value;
    return $this;
  }

  /**
   * Retrieve existing value.
   *
   * @return array
   *   Value.
   */
  public function getValue() {
    return $this->value;
  }

  /**
   * Return whether value is empty or not.
   *
   * @return bool
   *   TRUE if empty.
   */
  public function isEmpty() {
    return $this->empty;
  }

  /**
   * Set empty flag of value.
   *
   * @return ServicesClientMappingValue
   */
  public function setEmpty() {
    $this->empty = TRUE;
    return $this;
  }

  /**
   * Remove empty flag of value.
   *
   * @return ServicesClientMappingValue
   */
  public function setNotEmpty() {
    $this->empty = FALSE;
    return $this;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ServicesClientMappingValue::$empty protected property Flag that holds empty/not empty information.
ServicesClientMappingValue::$value protected property Value gathered by reader.
ServicesClientMappingValue::getValue public function Retrieve existing value.
ServicesClientMappingValue::isEmpty public function Return whether value is empty or not.
ServicesClientMappingValue::setEmpty public function Set empty flag of value.
ServicesClientMappingValue::setNotEmpty public function Remove empty flag of value.
ServicesClientMappingValue::setValue public function Set value data.
ServicesClientMappingValue::__construct public function Constructor.