Perform a PUT, return $default if 404 is returned.
@param string $path
@param array $data
@param mixed $default
@param boolean $associative_return
@param boolean $default_on_404 If `false`, throws an exception when 404
@return mixed
973763
public function put($path, $data = null, $default = null, $associative_return = false, $default_on_404 = true)
	{
		try {
			return $this->call(self::PUT, $path, $data, $associative_return);
		} catch (StatusCodeException $e) {
			if ($e->getCode() !== 404 || !$default_on_404) {
				throw $e;
			}
		}

		return $default;
	}
1106058
public function get($path, $default=Null)
    {
        $current = $this->data;
        $p = strtok($path, '.');

        while ($p !== false) {
            if (!isset($current[$p])) {
                return is_null($default) ? $this->getDefault($path) : $default;
            }
            $current = $current[$p];
            $p = strtok('.');
        }

        return $current;
    }
507152
static function pathGet($values, $path, $default = NULL) {
        foreach ($path as $key) {
            if (!is_array($values) || !isset($values[$key])) {
                return $default;
            }
            $values = $values[$key];
        }
        return $values;
    }
444179
protected function &get_node($path, &$data_arr)
    {
        $node = &$data_arr;
        if (!empty($path)) {
            foreach ((array)$path as $key) {
                if (!isset($node[$key]))
                    $node[$key] = array();
                $node = &$node[$key];
            }
        }

        return $node;
    }
303535
public static function get($path, $data = [])
	{
		ob_start();

		extract($data);

		try {
			$basePath = static::getInstance()->basePath;

			if ($basePath !== null) {
				if (mb_substr($path, 0, 1) === static::DIRECTORY_SEPARATOR) {
					$path = mb_substr($path, 1);
				}

				if (mb_substr($basePath, -1) === static::DIRECTORY_SEPARATOR) {
					$basePath = mb_substr($basePath, 0, -1);
				}

				$path = $basePath . static::DIRECTORY_SEPARATOR . $path;
			}

			include $path;
		} catch (\Exception $e) {
			ob_get_clean();
			throw $e;
		}

		return ob_get_clean();
	}
994089
private function putFile($path, $data)
    {
        $info = false;
        $url = parse_url($path);

        $fp = fsockopen($url['host'], $url['port'], $errno, $errstr, 5);
        if (!$fp) {
            return false;
        }

        $buffer = '';
        $b = "\r\n";

        stream_set_blocking($fp, true);
        stream_set_timeout($fp, 30, 200000);

        $out = 'PUT '.$url['path'].' HTTP/1.1'.$b;
        $out .= 'Host: '.$url['host'].$b;
        $out .= 'Content-Length: '.Util\Size::fromContent($data).$b.$b;
        $out .= $data;
        $out .= $b.$b;
        fwrite($fp, $out);
        fflush($fp);

        stream_set_blocking($fp, true);
        stream_set_timeout($fp, 30, 200000);

        while (!feof($fp) && !$info['timed_out']) {
            $info = stream_get_meta_data($fp);
            $buffer .= fgets($fp, 128);
        }
        fclose($fp);

        return true;
    }
405034
public function saveFile($path, $data)
    {
        $storage = $data;

        if ($data instanceof Slice)
        {
            $storage = $data->asArray();
        }

        switch ($this->type)
        {
            case PHP:
                $result = '<?php'
                    . PHP_EOL
                    . PHP_EOL .
                    'return ' . var_export($storage, true) . ';';
                break;

            case YML:
                $result = \Symfony\Component\Yaml\Yaml::dump($storage);
                break;

            case JSON:
                $json = clone $this->helper->json();
                $json->addOption(JSON_PRETTY_PRINT);
                $result = $json->encode($storage);
                break;

            default:
                throw new Exceptions\TypeNotFound($this->type);
        }

        $filePath = $this->path($path);

        return file_put_contents($filePath, $result);
    }
479376
public function prepend($path, $data)
    {
        return $this->filesystem->prepend(
            $this->path($path),
            $data
        );
    }
1338299
public static function first($array, $path, $default = false){
        $data = self::get($array, $path, array());
        if(count($data) > 0)
            return reset($data);

        return $default;
    }
1214128
public function patch($path = null, $data = [], array $options = []) {
		return $this->send(__FUNCTION__, $path, $data, $options);
	}
315927
private static function &dataByPath(array &$data, string $key, bool $create = false, $defaultValue = null)
    {
        if ($key === '') {
            return $data;
        }
        $pathSegments = explode('.', $key);
        foreach ($pathSegments as $pathSegment) {
            if (!is_array($data)) {
                $data = [];
            }
            if (!array_key_exists($pathSegment, $data) && !$create) {
                return $defaultValue;
            }
            $data = &$data[$pathSegment];
        }
        return $data;
    }
637209
public function put($path = null, $data = [], array $options = []) {
		return $this->send(__FUNCTION__, $path, $data, $options);
	}
105808
public function get($key, $default = null, $dot_syntax = true)
    {
        if ($dot_syntax === true) {
            $paths = explode('.', $key);
            $node =& $this->_data;
            
            foreach ($paths as $path) {
                if (!is_array($node) || !isset($node[$path])) {
                    // error occurred
                    return $default;
                }
                $node =& $node[$path];
            }
            
            return $node;
            
        } else {
            
            return isset($this->_data[$key]) ? $this->_data[$key] : $default;
            
        }
    }
585724
public function execute($key = null, $default = null, $data = null) {

		//Matching type array
		if(is_array($key)) {

			foreach($key as $index) {

				if(!isset($data[$index])) {
					return $default;
				}

				$data = $data[$index];
			}

			return $data;
		}

		//Matching type string
		if($key && isset($data[$key])) {
			return $data[$key];
		}

		//Matching type string array
		$names = explode('[', $key);

		foreach($names as $index => $name) {

			$name = rtrim($name, ']');

			if(!isset($data[$name])) {
				return null;
			}

			$data = $data[$name];

			if($index == count($names) - 1) {
				$default = $data;
			}
		}

		return $default;
	}
862300
public function get($path, array $data = [])
    {
        $contents = parent::get($path, $data);

        return $this->markdown->convertToHtml($contents);
    }
1277998
public function data($path = null, $default = null, $strip = true)
    {
        return $this->arrGetXss($this->dataData(), $path, $default, $strip);
    }
40926
function (data, path) {
    path = path || '';
    if (_.isObject(data)) {
      for (var key in data) {
        if (_.isObject(data)) {
          data[key] = _recurseFeedDefaultNamespace(data[key], path !== '' ? path + '.' + key : key);
        }
      }
      return data;
    }
    else {
      if (data == null || data === '') {
        // return default data if empty/null
        return path;
      }
      else {
        return data;
      }
    }
  }