获取$_GET 参数

@param null $name
@param null $defaultValue
@return array|mixed
@example 获取二维数组中的值：$this->get('Collect.category_id');
15558
public function get($name = null, $defaultValue = null)
    {
        if ($name == null) return $_GET;
        $rs = isset($_GET[$name]) ? $_GET[$name] : $defaultValue;
        //Collect.category_id 获取 Collect[category_id]
        if ($rs == null && stripos($name, '.') > 0) {
            $arr = explode('.', $name);
            $rs2 = $_GET[$arr[0]];
            if (isset($rs2[$arr[1]])) {
                $rs = $rs2[$arr[1]];
            }
        }
        return $rs;
    }
266289
public function get($id, $defaultValue = null)
    {
        if ($this->contains($id)) {
            return $this->fetch($id);
        }

        return $defaultValue;
    }
848585
public function get($name, $default = null)
    {
        if (isset($this->data[$name])) {
            return $this->data[$name];
        }

        return $default;
    }
944727
public function &get($name = null, $default = false)
    {
        if (empty($name))
        {
            return $this->data;
        }
        $type = gettype($name);
        if('string' === $type)
        {
            $name = explode('.', $name);
        }
        else if('array' !== $type)
        {
            return $default;
        }
        $result = &$this->data;
        foreach ($name as $value)
        {
            $type = gettype($result);
            if('array' === $type)
            {
                // 数组
                if (isset($result[$value]))
                {
                    $result = &$result[$value];
                }
                else
                {
                    return $default;
                }
            }
            else if('object' === $type)
            {
                // 对象
                if (property_exists($result, $value))
                {
                    $result = &$result->$value;
                }
                else
                {
                    return $default;
                }
            }
            else
            {
                return $default;
            }
        }
        if (count($name) > 0)
        {
            return $result;
        }
        else
        {
            return $default;
        }
    }
1177335
public function get($name = null, $default = null)
    {
        $source = $this->_context->_REQUEST;

        if ($name === null) {
            return $source;
        }

        if (isset($source[$name]) && $source[$name] !== '') {
            $value = $source[$name];

            if (is_array($value) && is_scalar($default)) {
                throw new InvalidValueException(['the value of `:name` name is not scalar', 'name' => $name]);
            }

            if ($default !== null) {
                $type = gettype($default);
                if ($type === 'string') {
                    return (string)$value;
                } elseif ($type === 'integer') {
                    return (int)$value;
                } elseif ($type === 'double') {
                    return (float)$value;
                } elseif ($type === 'boolean') {
                    return (bool)$value;
                } else {
                    return $value;
                }
            } else {
                return $value;
            }
        } else {
            if ($default === null) {
                throw new MissingRequiredFieldsException($name);
            }

            return $default;
        }
    }
653633
public <R> R get(@NotNull final String name, R defaultValue) {
        if (context.containsKey(name)) {
            return get(name);
        } else {
            return defaultValue;
        }
    }
906134
public function get($name, $default = null)
    {
        $result = $default;
        if($this->offsetExists($name)) {
            $result = $this->offsetGet($name);
        }

        return $result;
    }
765145
public function get($name = null, $default = null)
    {
        if(null === $name)
        {
            return $this->get;
        }
        else
        {
            return $this->get[$name] ?? $default;
        }
    }
288982
public function getAttribute( string $name, $defaultValue = false )
   {

      if ( ! $this->hasAttribute( $name ) )
      {
         return $defaultValue;
      }

      return $this->_attributes[ $name ];

   }
198775
public function get($key = null, $defaultValue = null) {
		$conditions = compact('key');
		if ($key === null) {
			return $this->find('all', $conditions);
		} else {
			$value = $this->field('value', $conditions);
			return $this->find('count', array('conditions' => $conditions)) ? $value : $defaultValue;
		}
	}
501793
public function value($name, $default = null)
    {
        if (! is_null($value = $this->valueFromOld($name))) {
            return $value;
        }

        if (! is_null($value = $this->valueFromModel($name))) {
            return $value;
        }
        return $default;
    }
1234693
protected function getParam($name, $defaultValue = null)
    {
        return $this->requestMethod == self::REQUEST_METHOD_GET ?
            Yii::$app->request->getQueryParam($name, $defaultValue) :
            Yii::$app->request->getBodyParam($name, $defaultValue);
    }
139733
public function get($name, $default = null)
    {
        $result = $default;
        if (array_key_exists($name, $this->_data)) {
            $result = $this->_data[$name];
        }
        return $result;
    }
957044
public @NotNull <T> T get(@NotNull String name, @NotNull T defaultValue) {
    @Nullable
    @SuppressWarnings("unchecked")
    T value = get(name, (Class<T>)defaultValue.getClass());
    if (value != null) {
      return value;
    }
    else {
      return defaultValue;
    }
  }
355211
protected function getSettingValue($name, $defaultValue = NULL) {
		return TRUE === isset($this->settings[$name]) ? $this->settings[$name] : $defaultValue;
	}
183148
private static function _getRequestParam($name, $defaultValue = null)
    {
        $value = $defaultValue;
        $request = Yii::$app->request;

        $get = $request->get($name, $defaultValue);
        $post = $request->post($name, $defaultValue);

        if ($post !== $defaultValue) {
            return $post;
        } elseif ($get !== $defaultValue) {
            return $get;
        }

        return $value;
    }
799899
public function param(string $name, $defaultValue = null)
    {
        return $this->parsedUri->queryString()->param($name, $defaultValue);
    }