getExternalMirrorRequest: Build GetExternalMirror's request
@link https://docs.qingcloud.com/qingstor/api/bucket/external_mirror/get_external_mirror.html Documentation URL

@return Request
357886
public function getExternalMirrorRequest()
    {
        $operation = array(
            'API' => 'GetBucketExternalMirror',
            'Method' => 'GET',
            'Uri' => '/<bucket-name>?mirror',
            'Headers' => array(
                'Host' => $this->properties['zone'] . '.' . $this->config->host,
            ),
            'Params' => array(
            ),
            'Elements' => array(
            ),
            'Properties' => $this->properties,
            'Body' => null
        );
        $this->getExternalMirrorValidate($operation);
        $req = new Request($this->config, $operation);
        return $req;
    }
123898
public static HttpServletResponse getHttpServletResponseFromExternalWebflowContext() {
        val servletExternalContext = (ServletExternalContext) ExternalContextHolder.getExternalContext();
        if (servletExternalContext != null) {
            return (HttpServletResponse) servletExternalContext.getNativeResponse();
        }
        return null;
    }
1226647
public function getExternalId()
    {
        $externalIds = array_flip($this->externalIds);
        $id          = null;
        $idIndex     = null;
        foreach (['headers', 'body'] as $type) {
            if (isset($this->responseActual[$type]) && isset($this->responseActual[$type])) {
                foreach ($this->responseActual[$type] as $key => $value) {
                    $key = preg_replace('/[^a-z0-9]/', '', strtolower($key));
                    if (isset($externalIds[$key]) && (null === $idIndex || $externalIds[$key] < $idIndex)) {
                        $idIndex = $externalIds[$key];
                        $id      = $value;
                        if (0 == $idIndex) {
                            break;
                        }
                    }
                }
            }
        }

        return $id;
    }
1139132
public static function get_potential_users_parameters() {
        return new external_function_parameters(
            array(
                'courseid' => new external_value(PARAM_INT, 'course id'),
                'enrolid' => new external_value(PARAM_INT, 'enrolment id'),
                'search' => new external_value(PARAM_RAW, 'query'),
                'searchanywhere' => new external_value(PARAM_BOOL, 'find a match anywhere, or only at the beginning'),
                'page' => new external_value(PARAM_INT, 'Page number'),
                'perpage' => new external_value(PARAM_INT, 'Number per page'),
            )
        );
    }
1186477
public static function create_contact_request_returns() {
        return new external_single_structure(
            array(
                'request' => new external_single_structure(
                    array(
                        'id' => new external_value(PARAM_INT, 'Message id'),
                        'userid' => new external_value(PARAM_INT, 'User from id'),
                        'requesteduserid' => new external_value(PARAM_INT, 'User to id'),
                        'timecreated' => new external_value(PARAM_INT, 'Time created'),
                    ),
                    'request record',
                    VALUE_OPTIONAL
                ),
                'warnings' => new external_warnings()
            )
        );
    }
1332891
public static function get_calendar_day_view_parameters() {
        return new external_function_parameters(
            [
                'year' => new external_value(PARAM_INT, 'Year to be viewed', VALUE_REQUIRED),
                'month' => new external_value(PARAM_INT, 'Month to be viewed', VALUE_REQUIRED),
                'day' => new external_value(PARAM_INT, 'Day to be viewed', VALUE_REQUIRED),
                'courseid' => new external_value(PARAM_INT, 'Course being viewed', VALUE_DEFAULT, SITEID, NULL_ALLOWED),
                'categoryid' => new external_value(PARAM_INT, 'Category being viewed', VALUE_DEFAULT, null, NULL_ALLOWED),
            ]
        );
    }
1332539
public static function get_item_ratings_returns() {

        return new external_single_structure(
            array(
                'ratings'    => new external_multiple_structure(
                    new external_single_structure(
                        array(
                            'id'              => new external_value(PARAM_INT,  'rating id'),
                            'userid'          => new external_value(PARAM_INT,  'user id'),
                            'userpictureurl'  => new external_value(PARAM_URL,  'URL user picture'),
                            'userfullname'    => new external_value(PARAM_NOTAGS, 'user fullname'),
                            'rating'          => new external_value(PARAM_NOTAGS, 'rating on scale'),
                            'timemodified'    => new external_value(PARAM_INT,  'time modified (timestamp)')
                        ), 'Rating'
                    ), 'list of ratings'
                ),
                'warnings'  => new external_warnings(),
            )
        );
    }
885398
public static function getSelfURL()
    {
        $selfURLhost = self::getSelfURLhost();

        $requestURI = '';
        if (!empty($_SERVER['REQUEST_URI'])) {
            $requestURI = $_SERVER['REQUEST_URI'];
            if ($requestURI[0] !== '/') {
                if (preg_match('#^https?://[^/]*(/.*)#i', $requestURI, $matches)) {
                    $requestURI = $matches[1];
                }
            }
        }

        $infoWithBaseURLPath = self::buildWithBaseURLPath($requestURI);
        if (!empty($infoWithBaseURLPath)) {
            $requestURI = $infoWithBaseURLPath;
        }

        return $selfURLhost . $requestURI;
    }
660677
public function getExternalHeader()
    {
        $parts = explode('\\', $this->namespace);

        return 'ext/'.strtolower($parts[0].\DIRECTORY_SEPARATOR.str_replace('\\', \DIRECTORY_SEPARATOR, $this->namespace).\DIRECTORY_SEPARATOR.$this->name).'.zep';
    }
1070373
public static function get_user_attempts_parameters() {
        return new external_function_parameters (
            array(
                'quizid' => new external_value(PARAM_INT, 'quiz instance id'),
                'userid' => new external_value(PARAM_INT, 'user id, empty for current user', VALUE_DEFAULT, 0),
                'status' => new external_value(PARAM_ALPHA, 'quiz status: all, finished or unfinished', VALUE_DEFAULT, 'finished'),
                'includepreviews' => new external_value(PARAM_BOOL, 'whether to include previews or not', VALUE_DEFAULT, false),

            )
        );
    }
780047
public static function get_calendar_monthly_view_parameters() {
        return new external_function_parameters(
            [
                'year' => new external_value(PARAM_INT, 'Month to be viewed', VALUE_REQUIRED),
                'month' => new external_value(PARAM_INT, 'Year to be viewed', VALUE_REQUIRED),
                'courseid' => new external_value(PARAM_INT, 'Course being viewed', VALUE_DEFAULT, SITEID, NULL_ALLOWED),
                'categoryid' => new external_value(PARAM_INT, 'Category being viewed', VALUE_DEFAULT, null, NULL_ALLOWED),
                'includenavigation' => new external_value(
                    PARAM_BOOL,
                    'Whether to show course navigation',
                    VALUE_DEFAULT,
                    true,
                    NULL_ALLOWED
                ),
                'mini' => new external_value(
                    PARAM_BOOL,
                    'Whether to return the mini month view or not',
                    VALUE_DEFAULT,
                    false,
                    NULL_ALLOWED
                ),
            ]
        );
    }
675873
public static function get_content_parameters() {
        return new external_function_parameters(
            array(
                'component' => new external_value(PARAM_COMPONENT, 'Component where the class is e.g. mod_assign.'),
                'method' => new external_value(PARAM_ALPHANUMEXT, 'Method to execute in class \$component\output\mobile.'),
                'args' => new external_multiple_structure(
                    new external_single_structure(
                        array(
                            'name' => new external_value(PARAM_ALPHANUMEXT, 'Param name.'),
                            'value' => new external_value(PARAM_RAW, 'Param value.')
                        )
                    ), 'Args for the method are optional.', VALUE_OPTIONAL
                )
            )
        );
    }
690354
public static function get_content_pages_viewed_parameters() {
        return new external_function_parameters (
            array(
                'lessonid' => new external_value(PARAM_INT, 'lesson instance id'),
                'lessonattempt' => new external_value(PARAM_INT, 'lesson attempt number'),
                'userid' => new external_value(PARAM_INT, 'the user id (empty for current user)', VALUE_DEFAULT, null),
            )
        );
    }
1351880
protected function getRequest()
    {
        if (version_compare(Kernel::VERSION, '2.4', '<=')) {
            return $this->container->get('request');
        }

        return $this->container->get('request_stack')->getMasterRequest();
    }
107849
private function insertExternalResources()
    {
        $header_render = '';
        foreach ($this->externalResources->get(self::CSS_LINK, array()) as $href) {
            $header_render .= $this->generateStylesheetTag($href);
        }

        foreach ($header_js = $this->externalResources->get(self::HEADER_JS, array()) as $src) {
            $header_render .= $this->generateJavascriptTag($src);
        }

        if (!empty($header_render)) {
            $this->setRender(str_replace('</head>', "$header_render</head>", $this->getRender()));
        }

        $footer_render = '';
        $footer_js = array_diff($this->externalResources->get(self::FOOTER_JS, array()), $header_js);
        foreach ($footer_js as $src) {
            $footer_render .= $this->generateJavascriptTag($src);
        }

        if (!empty($footer_render)) {
            $this->setRender(str_replace('</body>', "$footer_render</body>", $this->getRender()));
        }

        $this->externalResources->remove(self::CSS_LINK);
        $this->externalResources->remove(self::HEADER_JS);
        $this->externalResources->remove(self::FOOTER_JS);

        return $this;
    }
374929
public function getRequest()
    {
        $request = $this->container['request'];

        if ($request instanceof IlluminateRequest && ! $request instanceof Request) {
            $request = (new Request())->createFromIlluminate($request);
        }

        return $request;
    }
645471
public function getSslSelfLink()
    {
        if ($this->isAdmin()) {
            // using getSelfLink() method in admin mode (#2745)
            return $this->getSelfLink();
        }

        if (($sValue = $this->getViewConfigParam('sslselflink')) === null) {
            $sValue = $this->getConfig()->getShopSecureHomeURL();
            $this->setViewConfigParam('sslselflink', $sValue);
        }

        return $sValue;
    }