Example #1
0
 /**
  * Check if an item exists in an array using "dot" notation.
  *
  * @param  array   $array
  * @param  string  $key
  * @return bool
  */
 function array_has($array, $key)
 {
     return Arr::has($array, $key);
 }
Example #2
0
 /**
  * See if a key exists within session data using javascript dot notation
  *
  * @param    string     Session data key
  * @returns  boolean    True if found
  */
 public function has($key)
 {
     return Arr::has($_SESSION, $key);
 }
Example #3
0
 /**
  * Check if a key was set upon this bag's data
  *
  * @param   string  $key
  * @return  bool
  * @since   2.0.0
  */
 public function has($key)
 {
     $result = Arr::has($this->data, $key);
     if (!$result and $this->parentEnabled) {
         $result = $this->parent->has($key);
     }
     return $result;
 }
Example #4
0
 /**
  * Checks existence of a param using "dot notation" in the session.
  *
  * @param string $path
  *
  * @throws \LogicException If the session has not been started yet
  *
  * @return bool
  */
 public final function has($path)
 {
     if (!$this->started()) {
         throw new LogicException('The session has not been started yet.');
     }
     return Arr::has($this->data, $path);
 }
Example #5
0
 /**
  * Checks if the given key exists.
  *
  * @param  string $key
  * @return bool
  */
 public function has($key)
 {
     return Arr::has($this->values, $key);
 }