src/Controller/Plugin/PaginationBuilder.php
public function paginator($paginatorName, $defaultParams = [], $as = 'paginator')
    {
        if (is_string($defaultParams)) {
            $as = $defaultParams;
            $defaultParams = [];
        }

        $this->stack['paginator'] = ['as' => $as, $paginatorName, $defaultParams];
        return $this;
    }
public function paginator($paginatorName, $defaultParams = [], $as = 'paginator')
    {
        if (is_string($defaultParams)) {
            $as = $defaultParams;
            $defaultParams = [];
        }

        $this->stack['paginator'] = ['as' => $as, $paginatorName, $defaultParams];
        return $this;
    }
Add arguments for the call to the CreatePaginator plugin.

@see \Core\Controller\Plugin\CreatePaginator::__invoke()

@param string       $paginatorName
@param array  $defaultParams
@param string $as The name of the key in the result array.

@return self