/** * @return $this * TODO: protected */ public function loadArray() { $data = $this->getData(); $value = $this->decode($data); $this->arrayAccess = ArrayAccess::create($value); return $this; }
/** * @inheritdoc */ public function loadArray() { $this->arrayAccess = ArrayAccess::create($this->decode($this->getJson())); return $this; }
public function getRequestedValue() { $post = ArrayAccess::create($_POST); try { return $post->getValue($this->getPath()); } catch (Exception $e) { } }
public function __construct(array $values, $configPath = null) { $this->values = ArrayAccess::create($values); $this->configPath = $configPath; }
public function getParam($path) { return $this->params->getParam($path); }
public function getParam($path, $defaultValue = null) { return $this->params->getValue($path, $defaultValue); }
public function testKeyMapping() { $original = array(1 => 1, 2 => 2, 3 => 3); $instance = ArrayAccess::create($original); $instance->getMap()->map(function ($value, $key) { return array($key - 1 => $value * 2); }); $this->assertEquals(array(0 => 2, 1 => 4, 2 => 6), $instance->getArray()); }