jaxon-php /
jaxon-mono
| 1 | <?php |
||||||
| 2 | |||||||
| 3 | use Jaxon\Jaxon; |
||||||
| 4 | |||||||
| 5 | class HelloWorld extends \Jaxon\App\FuncComponent |
||||||
| 6 | { |
||||||
| 7 | public function sayHello(bool $isCaps) |
||||||
| 8 | { |
||||||
| 9 | $text = $isCaps ? 'HELLO WORLD!' : 'Hello World!'; |
||||||
| 10 | $this->response->assign('div2', 'innerHTML', $text); |
||||||
|
0 ignored issues
–
show
Bug
Best Practice
introduced
by
Loading history...
|
|||||||
| 11 | } |
||||||
| 12 | |||||||
| 13 | public function showPage($pageNumber) |
||||||
| 14 | { |
||||||
| 15 | $itemsPerPage = 10; |
||||||
| 16 | $totalItems = 150; |
||||||
| 17 | $this->paginator($pageNumber, $itemsPerPage, $totalItems) |
||||||
|
0 ignored issues
–
show
The method
paginator() does not exist on HelloWorld.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. Loading history...
|
|||||||
| 18 | ->page(function(int $page) { |
||||||
| 19 | $this->response->assign('div2', 'innerHTML', "Showing page number $page"); |
||||||
|
0 ignored issues
–
show
|
|||||||
| 20 | }) |
||||||
| 21 | ->render($this->rq()->showPage(), 'pagination'); |
||||||
|
0 ignored issues
–
show
The method
rq() does not exist on HelloWorld.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. Loading history...
|
|||||||
| 22 | } |
||||||
| 23 | } |
||||||
| 24 | |||||||
| 25 | // Register object |
||||||
| 26 | $jaxon = jaxon(); |
||||||
| 27 | |||||||
| 28 | $jaxon->setOption('js.lib.uri', '/js'); |
||||||
| 29 | |||||||
| 30 | $jaxon->register(Jaxon::CALLABLE_CLASS, HelloWorld::class); |
||||||
| 31 |