From 240f61d89751f90e3991ed01757f2584793d6e49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D0=B0=D0=B1=D0=B8=D1=87=D0=B5=D0=B2=20=D0=9C=D0=B0?= =?UTF-8?q?=D0=BA=D1=81=D0=B8=D0=BC?= Date: Thu, 6 Apr 2017 08:34:03 +0300 Subject: [PATCH] Update Slice.php --- src/Slice/Slice.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Slice/Slice.php b/src/Slice/Slice.php index 81794b2..7aa61f5 100644 --- a/src/Slice/Slice.php +++ b/src/Slice/Slice.php @@ -101,6 +101,17 @@ public function getData($path, $default = null) ); } + /** + * @param string $path + * @param mixed $default + * + * @return mixed + */ + public function atData($path, $default = null) + { + return $this->storage[$path] ?? $default; + } + /** * @param string $path *