@param string $table

@param int $page

@return array
177864
public function getAll(string $table, int $page = 0): array
    {
        try {
            $this->db->beginTransaction();

            $sql = "SELECT * FROM $table";

            if ($page > 0) {
                $sql = $sql . " LIMIT " . self::LIMIT . " OFFSET " . self::LIMIT * ($page - 1);
            }
            /** @var PDOStatement $stmt */
            $stmt = $this->db->prepare($sql);
            $stmt->execute();

            $this->db->commit();

            $result = $stmt->fetchAll();

            return $result;
        } catch (PDOException $e) {
            $this->db->rollBack();
            throw new PDOException($e);
        }
    }
566804
public function findAll(
        $page = 1,
        $per_page = 20,
        $order_by = self::ORDERBY_CREATED_AT,
        $order_dir = self::ORDERDIR_ASC
    ) {
        $results = self::getAll($this->_user, $page, $per_page, $order_by, $order_dir);

        if (isset($results['subscriptions'])) { // Cope with pagination
            $results = $results['subscriptions'];
        }

        $retval = array();

        foreach ($results as $pylon) {
            $retval[] = new self($this->_user, $pylon);
        }

        return $retval;
    }
661536
public function MangaRecentlyUpdatedByUsers(int $id, int $page = 1): array
    {
        return $this->myanimelist->getMangaRecentlyUpdatedByUsers(
            new Request\Manga\MangaRecentlyUpdatedByUsersRequest($id, $page)
        );
    }
806515
public function getPageTemplates(HasPageTemplateInterface $page)
    {
        $pageTemplates = [];
        foreach ($page->getPageTemplates() as $pageTemplate) {
            if (is_string($pageTemplate)) {
                $pt = $this->parser->parse($pageTemplate);
            } elseif ($pageTemplate instanceof PageTemplateInterface) {
                $pt = $pageTemplate;
            } else {
                throw new \Exception("don't know how to handle the pageTemplate " . get_class($pageTemplate));
            }

            $pageTemplates[$pt->getName()] = $pt;
        }

        return $pageTemplates;
    }
1354685
public function render(Page $page)
    {
        return $this->doRender(
            $this->getRawContent(),
            $this->getAttributes() + ['content' => $page->getRenderedContent()]
        );
    }
668750
public function getOnlinePrevSibling(Page $page)
    {
        $query = $this->createQueryBuilder('p')
                ->andIsSiblingsOf($page, true, ['_leftnode' => 'DESC', '_position' => 'DESC'], 1, 0)
                ->andIsOnline();

        if (true === $page->hasMainSection()) {
            $query->andIsSection()
                    ->andWhere($query->getSectionAlias().'._leftnode < :leftnode')
                    ->setParameter('leftnode', $page->getLeftnode());
        } else {
            $qOR = $query->expr()->orX();
            $qOR->add('p._section != p')
                    ->add($query->getSectionAlias().'._parent = :parent');

            $query->andWhere('p._position < :position')
                    ->andWhere($qOR)
                    ->setParameter('position', $page->getPosition())
                    ->setParameter('parent', $page->getParent()->getSection());
        }

        return $query->getQuery()
                        ->getOneOrNullResult();
    }
963015
protected function _fetchTableIndexes($table)
    {
        $return = array();
        $query  = $this->getObject('lib:database.query.show')
            ->show('INDEX')
            ->from($table);

        if($indexes = $this->select($query, Database::FETCH_OBJECT_LIST))
        {
            foreach($indexes as $index) {
                $return[$index->Key_name][$index->Seq_in_index] = $index;
            }
        }

        return $return;
    }
1072811
public function index($page = null)
    {
        $url = sprintf('buckets/%d/questions/%d/answers.json', $this->bucket, $this->parent);

        $answers = $this->client->get($url, [
            'query' => [
                'page' => $page,
            ],
        ]);

        return $this->indexResponse($answers, QuestionAnswer::class);
    }
202136
public function getTextArray(Page $page = null)
	{
		$text                = array();
		$sections            = $this->getSectionsText($this->content);
		$current_font        = new Font($this->document);

		foreach ($sections as $section) {

			$commands = $this->getCommandsText($section);

			foreach ($commands as $command) {

				switch ($command[self::OPERATOR]) {
					// set character spacing
					case 'Tc':
						break;

					// move text current point
					case 'Td':
						break;

					// move text current point and set leading
					case 'TD':
						break;

					case 'Tf':
						list($id,) = preg_split('/\s/s', $command[self::COMMAND]);
						$id           = trim($id, '/');
						$current_font = $page->getFont($id);
						break;

					case "'":
					case 'Tj':
						$command[self::COMMAND] = array($command);
					case 'TJ':
						// Skip if not previously defined, should never happened.
						if (is_null($current_font)) {
							// Fallback
							// TODO : Improve
							$text[] = $command[self::COMMAND][0][self::COMMAND];
							break;
						}

						$sub_text = $current_font->decodeText($command[self::COMMAND]);
						$text[] = $sub_text;
						break;

					// set leading
					case 'TL':
						break;

					case 'Tm':
						break;

					// set super/subscripting text rise
					case 'Ts':
						break;

					// set word spacing
					case 'Tw':
						break;

					// set horizontal scaling
					case 'Tz':
						//$text .= "\n";
						break;

					// move to start of next line
					case 'T*':
						//$text .= "\n";
						break;

					case 'Da':
						break;

					case 'Do':
						if (!is_null($page)) {
							$args = preg_split('/\s/s', $command[self::COMMAND]);
							$id   = trim(array_pop($args), '/ ');
							if ($xobject = $page->getXObject($id)) {
								$text[] = $xobject->getText($page);
							}
						}
						break;

					case 'rg':
					case 'RG':
						break;

					case 're':
						break;

					case 'co':
						break;

					case 'cs':
						break;

					case 'gs':
						break;

					case 'en':
						break;

					case 'sc':
					case 'SC':
						break;

					case 'g':
					case 'G':
						break;

					case 'V':
						break;

					case 'vo':
					case 'Vo':
						break;

					default:
				}
			}
		}

		return $text;
	}
118988
public function getPermissionsByPage($page, $sid)
    {
        $objectIdentity = $this->getClassScopeObjectIdentity($page);

        try{

            $ace = $this->getObjectAce($objectIdentity, $sid);
        }
        catch (\Exception $e){

            if (null !== $page->getParent()) {

                return $this->getPermissionsByPage($page->getParent(), $sid);
            }
            elseif ($page->isRoot()){

                try{
                    $ace = $this->getClassAce($this->getClassScopeObjectIdentity(ClassUtils::getRealClass($page)), $sid);
                }
                catch (\Exception $e){
                    return [];
                }
            }
            else{
                return [];
            }
        }

        return $this->getAccessGranted($ace);
    }
213109
public function page($page)
    {
        $limit = $this->getSqlPart('limit');
        if (!$limit) {
            $limit = 10;
            $this->add('limit', $limit);
        }
        return $this->offset(($page - 1) * $limit);
    }
1222909
public function getAll($page = null)
    {
        $page = !empty($page) ? "page={$page}" : '';
        $request = $this->paystackHttpClient->get(
            $this->transformUrl(Resource::CUSTOMERS_URL, '').$page
        );

        return $this->processResourceRequestResponse($request);
    }
605805
public function listTableIndexes($table)
    {
        $sql = $this->_platform->getListTableIndexesSQL($table, $this->_conn->getDatabase());

        $tableIndexes = $this->_conn->fetchAll($sql);

        return $this->_getPortableTableIndexesList($tableIndexes, $table);
    }
1070712
public function destroy(Page $page)
    {
        $page->delete();

        return intend([
            'url' => route('managerarea.pages.index'),
            'with' => ['warning' => trans('cortex/foundation::messages.resource_deleted', ['resource' => trans('cortex/pages::common.page'), 'identifier' => $page->name])],
        ]);
    }
63686
public function getUsersList($page = 1)
    {
        $this->checkPageNumber($page);

        return $this->adapter->get(sprintf('/users?page=%d', $page));
    }
89366
public function getAncestorsAction(Page $page)
    {
        $ancestors = $this->getPageRepository()->getAncestors($page);

        return $this->createResponse($this->formatCollection($ancestors));
    }
523520
public function getDelete(Page $page)
    {
        $this->authorize('delete', $page);

        return view($this->viewPrefix.'.delete', [
            'children' => $page->countChildren(),
            'page'     => $page,
        ]);
    }