From: Vincent Vanwaelscappel Date: Wed, 10 Jul 2019 15:11:07 +0000 (+0200) Subject: #2878 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=5ff059b52dd5f9a3806fe5aa73b70c60a7933bbc;p=cubist_cms-back.git #2878 --- diff --git a/src/app/Magic/PageData.php b/src/app/Magic/PageData.php index f3ac10f..6b62066 100644 --- a/src/app/Magic/PageData.php +++ b/src/app/Magic/PageData.php @@ -39,61 +39,118 @@ class PageData implements \ArrayAccess { } + /** + * @param string $offset + * @param $value + */ public function set($offset, $value) { Arr::set($this->_data, $offset, $value); } + /** + * @param string $offset + * @return bool + */ public function exists($offset) { - return Arr::exists($this->_data, $offset); + return Arr::has($this->_data, $offset); } + /** + * @param string $offset + * @return bool + */ + public function has($offset) + { + return $this->exists($offset); + } + + /** + * @param string $offset + */ public function unset($offset) { Arr::set($this->_data, $offset, null); } + /** + * @param string $offset + * @param mixed $default + * @return mixed + */ public function get($offset, $default = null) { return Arr::get($this->_data, $offset, $default); } + /** + * @param mixed $offset + * @param mixed $value + */ public function offsetSet($offset, $value) { $this->set($offset, $value); } + /** + * @param mixed $offset + * @return bool + */ public function offsetExists($offset) { return $this->exists($offset); } + /** + * @param mixed $offset + */ public function offsetUnset($offset) { return $this->unset($offset); } + /** + * @param mixed $offset + * @return mixed + */ public function offsetGet($offset) { return $this->get($offset); } + /** + * @param $name string + * @return mixed + */ public function __get($name) { return $this->get($name); } + /** + * @param string $name + * @param mixed $value + */ public function __set($name, $value) { return $this->set($name, $value); } + /** + * @param string $name + */ public function __unset($name) { $this->unset($name); } + /** + * @param string $offset + * @param string $conversionName + * @param mixed $default + * @return string|null + */ public function getImageURL($offset, $conversionName = '', $default = null) { if (!$this->exists($offset)) {