예제 #1
0
 /**
  * @expectedException \LogicException
  */
 public function testExchangeArrayFails()
 {
     $params = new ImmutableOptions();
     $params->exchangeArray(array('foo' => 'omg'));
 }
예제 #2
0
 /**
  * Returns a specific value or values from the 'styles' option.
  *
  * @param string $value_path You can use jmespath expressions here: https://github.com/mtdowling/jmespath.php
  * @param mixed $default
  *
  * @return mixed Either the option value or the given default.
  */
 protected function getStyle($value_path, $default = null)
 {
     $style = $this->styles->getValues($value_path);
     return $style ?: $default;
 }