MultipleValueOrTextNode.php 988 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. namespace Braintree;
  3. class MultipleValueOrTextNode extends MultipleValueNode
  4. {
  5. public function __construct($name)
  6. {
  7. parent::__construct($name);
  8. $this->textNode = new TextNode($name);
  9. }
  10. public function contains($value)
  11. {
  12. $this->textNode->contains($value);
  13. return $this;
  14. }
  15. public function endsWith($value)
  16. {
  17. $this->textNode->endsWith($value);
  18. return $this;
  19. }
  20. public function is($value)
  21. {
  22. $this->textNode->is($value);
  23. return $this;
  24. }
  25. public function isNot($value)
  26. {
  27. $this->textNode->isNot($value);
  28. return $this;
  29. }
  30. public function startsWith($value)
  31. {
  32. $this->textNode->startsWith($value);
  33. return $this;
  34. }
  35. public function toParam()
  36. {
  37. return array_merge(parent::toParam(), $this->textNode->toParam());
  38. }
  39. }
  40. class_alias('Braintree\MultipleValueOrTextNode', 'Braintree_MultipleValueOrTextNode');