for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
use Jaxon\App\PageComponent;
use Jaxon\App\PageDatabagTrait;
/**
* @databag page
*/
class PageContent extends PageComponent
{
use PageDatabagTrait;
* @inheritDoc
protected function bagName(): string
return 'page';
}
protected function bagAttr(): string
return 'number';
protected function limit(): int
return 10;
protected function count(): int
return 150;
public function html(): string
return '<div style="margin-bottom:10px;font-weight:bold;">' .
$this->bag('page')->get('title') .
'</div>Showing page number ' . $this->currentPage();
public function showPage(int $pageNumber)
// Get the paginator. This will also set the final page number value.
$paginator = $this->paginator($pageNumber);
// Render the page content.
$this->render();
// Render the pagination component.
$paginator->render($this->rq()->showPage(je()->rd()->page()));
showPage()
Jaxon\Script\Call\JxnCall
__call
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
ignore-call
$paginator->render($this->rq()->/** @scrutinizer ignore-call */ showPage(je()->rd()->page()));
public function show()
$title = 'This is the page title';
$this->bag('page')->set('title', $title);
$this->showPage(1);
jaxon()->app()->setup(configFile('component.php'));