Создавать и возвращать заголовки для этого запроса.

@return array
550695
public function getHeaders()
    {
        $headers = static::getDefaultHeaders();

        if ($this->eTag) {
            $headers['If-None-Match'] = $this->eTag;
        }

        return array_merge($this->headers, $headers);
    }
53976
public function toArray(): array
    {
        return [
            'name'      => $this->name,
            'path'      => $this->path,
            'method'    => $this->method,
            'handler'   => $this->handler,
            'binds'     => $this->bindVars,
            'params'    => $this->params,
            'options'   => $this->options,
            //
            'pathVars'  => $this->pathVars,
            'pathStart' => $this->pathStart,
            'pathRegex' => $this->pathRegex,
            //
            'chains'    => $this->chains,
        ];
    }
1261217
protected function getIDListFromDB() : array
    {
        if ($this->sValue == ProductListStore::SORT_PRICE_ASC) {
            $arElementIDList = $this->getByPriceASC();
        } elseif ($this->sValue == ProductListStore::SORT_PRICE_DESC) {
            $arElementIDList = $this->getByPriceDESC();
        } elseif ($this->sValue == ProductListStore::SORT_NEW) {
            $arElementIDList = $this->getNewProductList();
        } elseif ($this->sValue == ProductListStore::SORT_NO) {
            $arElementIDList = $this->getProductList();
        } elseif (preg_match('%^'.ProductListStore::SORT_PRICE_ASC.'\|.+%', $this->sValue)) {
            $arElementIDList = $this->getByPriceTypeASC();
        } elseif (preg_match('%^'.ProductListStore::SORT_PRICE_DESC.'\|.+%', $this->sValue)) {
            $arElementIDList = $this->getByPriceTypeDESC();
        } else {
            $arElementIDList = $this->getCustomSortingList();
        }

        return $arElementIDList;
    }
687199
public function toArray()
    {
        return [
            'id' => $this->id,
            'filename' => $this->filename,
            'filetype' => $this->filetype,
            'filesize' => $this->filesize,
            'tags' => $this->tags,
            'preview_url' => $this->previewUrl(),
            'url' => $this->downloadUrl()
        ];
    }
84347
public function toArray()
    {
        return array(
            'filter' => $this->getFilter(),
            'width' => $this->getWidth(),
            'height' => $this->getHeight(),
            'percent' => $this->getPercent(),
            'dummy' => $this->getDummy(),
            'border' => $this->getBorder(),
            'layer' => $this->getLayer(),
            'quality' => $this->getQuality(), 
            'crop' => $this->getCrop(),
            'x' => $this->getX(),
            'y' => $this->getY(),
            'rotate' => $this->getRotate(),
            'gravity' => $this->getGravity(), 
            'extension' => $this->getExtension(),
            'filename' => $this->getFilename(),
        );
    }
408943
public function fields(): array
    {
        $categoryContent = 'category.term.content.'.app()->getLocale();

        return [
            Input::make($categoryContent.'.name')
                ->type('text')
                ->max(255)
                ->required()
                ->title(__('Category name'))
                ->placeholder(__('Category name'))
                ->help(__('Category title')),

            Input::make('category.term.slug')
                ->type('text')
                ->max(255)
                ->required()
                ->title(__('Slug')),

            Select::make('category.parent_id')
                ->options(function () {
                    $options = $this->query->getContent('catselect');

                    return array_replace([0=> __('Without parent')], $options);
                })
                ->title(__('Parent Category')),

            TinyMCE::make($categoryContent.'.body')
                ->title(__('Description')),

        ];
    }
1275335
public function getHandlers()
    {
        $filters = &gplcart_static('filter.handlers');

        if (isset($filters)) {
            return $filters;
        }

        $filters = array();
        $this->hook->attach('filter.handlers', $filters, $this);

        foreach ($filters as $id => &$filter) {
            $filter['filter_id'] = $id;
            $filter += array(
                'role_id' => array(),
                'status' => true,
                'module' => null
            );
        }

        return $filters;
    }
898545
public function toArray()
    {
        // This element needs only in template
        $this->setHtmlAttribute('method', 'POST');
        $this->setHtmlAttribute('action', $this->getAction());

        return [
            'items' => $this->getElements()->onlyVisible(),
            'instance' => $this->getModel(),
            'attributes' => $this->htmlAttributesToString(),
            'buttons' => $this->getButtons(),
            'backUrl' => session('_redirectBack', \URL::previous()),
        ];
    }
1241756
public function getGeneralFiles()
    {
        $name = $this->getParsedNameInput();

        return [
            'routes' => [
                'path' => '/routes/' . $name .'.php',
                'stub' => __DIR__ . '/../stubs/routes/routes.stub',
            ],
            'middleware' => [
                'path' => '/app/Http/Middleware/RedirectIfNot' . ucfirst($name) .'.php',
                'stub' => __DIR__ . '/../stubs/Middleware/Middleware.stub',
            ],
            'guest_middleware' => [
                'path' => '/app/Http/Middleware/RedirectIf' . ucfirst($name) .'.php',
                'stub' => __DIR__ . '/../stubs/Middleware/GuestMiddleware.stub',
            ],
            'login_controller' => [
                'path' => '/app/Http/Controllers/' . ucfirst($name) . 'Auth/' . 'LoginController.php',
                'stub' => __DIR__ . '/../stubs/Controllers/LoginController.stub',
            ],
            'register_controller' => [
                'path' => '/app/Http/Controllers/' . ucfirst($name) . 'Auth/' . 'RegisterController.php',
                'stub' => __DIR__ . '/../stubs/Controllers/RegisterController.stub',
            ],
            'forgot_password_controller' => [
                'path' => '/app/Http/Controllers/' . ucfirst($name) . 'Auth/' . 'ForgotPasswordController.php',
                'stub' => __DIR__ . '/../stubs/Controllers/ForgotPasswordController.stub',
            ],
            'reset_password_controller' => [
                'path' => '/app/Http/Controllers/' . ucfirst($name) . 'Auth/' . 'ResetPasswordController.php',
                'stub' => __DIR__ . '/../stubs/Controllers/ResetPasswordController.stub',
            ],
            'reset_password_notification' => [
                'path' => '/app/Notifications/' . ucfirst($name) .'ResetPassword.php',
                'stub' => __DIR__ . '/../stubs/Notifications/ResetPassword.stub',
            ],
        ];
    }
1100331
public function toWebDriver()
    {
        return [
            'type' => 'contact',
            'phone_number' => $this->phone_number,
            'first_name' => $this->first_name,
            'last_name' => $this->last_name,
            'user_id' => $this->user_id,
            'vcard' => $this->vcard,
        ];
    }
282790
public function getAttributes(): array
    {
        $search = array_column($this->map, 'attr');
        $result = ldap_read($this->ldap->getResource(), $this->ldap_dn, '(objectClass=*)', $search);
        $entries = ldap_get_entries($this->ldap->getResource(), $result);
        $attributes = $entries[0];

        $this->logger->info("get ldap user [{$this->ldap_dn}] attributes", [
            'category' => get_class($this),
            'params' => $attributes,
        ]);

        return $attributes;
    }
878404
public function getProcessedFields()
    {
        return [
            'page'    => $this->getPage(),
            'perPage' => $this->getPerPage(),
            'filter'  => $this->filter,
            'orderBy' => $this->orderBy,
            'query'   => $this->searchQuery
        ];
    }
1368086
protected function getIDListFromDB() : array
    {
        $arElementIDList = (array) Product::getByCategory($this->sValue)->lists('id');

        //Get product ID list for additional category relation
        $arAdditionalElementIDList = (array) DB::table('lovata_shopaholic_additional_categories')->where('category_id', $this->sValue)->lists('product_id');
        $arElementIDList = array_merge($arElementIDList, $arAdditionalElementIDList);
        $arElementIDList = array_unique($arElementIDList);

        return $arElementIDList;
    }
1321243
public function toArray()
    {
        return [
            'id' => $this->getId(),
            'key' => $this->getKey(),
            'name' => $this->getName(),
            'meta' => $this->getMeta(),
            'keywords' => $this->getKeywords(),
            'defaultLocale' => $this->getDefaultLocale(),
            'creator' => $this->getCreator(),
            'changer' => $this->getChanger(),
            'created' => $this->getCreated(),
            'changed' => $this->getChanged(),
        ];
    }
735583
public function toArray()
    {
        return [
            'id'          => $this->id,
            'module'      => $this->module,
            'bundle'      => $this->bundle,
            'position'    => $this->position,
            'name'        => $this->name,
            'description' => $this->description,
            'category'    => $this->category,
            'active'      => $this->active,
            'tags'        => $this->tags
        ];
    }
154678
final protected function getFilters() : array
    {
        return [
            'id' => [['int', true]],
            'digitalId' => [['int', true]],
            'title' => [['string', true, 0]],
            'issueNumber' => [['strval'], ['string', true, 0]],
            'variantDescription' => [['string', true, 0]],
            'description' => [['string', true, 0]],
            'modified' => [['date', true]],
            'isbn' => [['string', true, 0]],
            'upc' => [['string', true, 0]],
            'diamondCode' => [['string', true, 0]],
            'ean' => [['string', true, 0]],
            'issn' => [['string', true, 0]],
            'format' => [['string', true, 0]],
            'pageCount' => [['int', true]],
            'textObjects' => ['default' => [], ['text-objects']],
            'resourceURI' => [['string', true, 0]],
            'urls' => ['default' => [], ['_urls']],
            'series' => ['default' => new Summary(), ['summary']],
            'variants' => ['default' => [], ['summaries']],
            'collections' => ['default' => [], ['summaries']],
            'collectedIssues' => ['default' => [], ['summaries']],
            'dates' => ['default' => [], ['_dates']],
            'prices' => ['default' => [], ['prices']],
            'thumbnail' => ['default' => new Image(), ['image']],
            'images' => ['default' => [], ['images']],
            'creators' => ['default' => new ResourceList(), ['resource-list']],
            'characters' => ['default' => new ResourceList(), ['resource-list']],
            'stories' => ['default' => new ResourceList(), ['resource-list']],
            'events' => ['default' => new ResourceList(), ['resource-list']],
        ];
    }
976589
public function getMiddleware() : array
    {
        if (!$this->providesMiddleware()) {
            return [];
        }

        $allControllerMiddleware = array_filter(
            $this->getController()->getControllerMiddleware(),
            function (ControllerMiddleware $middleware) {
                return !$middleware->excludedForMethod($this->controllerMethod);
            }
        );

        return array_map(
            function ($controllerMiddleware) {
                return $controllerMiddleware->middleware();
            },
            $allControllerMiddleware
        );
    }