tinymvc-php icon indicating copy to clipboard operation
tinymvc-php copied to clipboard

Pass parameters to the __construct

Open Sa1ch opened this issue 7 years ago • 1 comments

Hello! I'm writing a pagination plugin and I'm having a problem.

$this->load->library('pagination','pag'); $this->pag(30);

file tinymvc_library_pagination.php

`class TinyMVC_Library_Pagination { var $total_count; function __construct($total_count) {

} }`

Getting error:

Missing argument 1 for TinyMVC_Library_Pagination::__construct(), called in /home/admin/web/rusex.su/public_html/tinymvc/sysfiles/plugins/tinymvc_load.php on line 112 and defined

How to correctly pass parameters to the constructor?

Sa1ch avatar May 02 '17 06:05 Sa1ch

You could try copying the way tinymvc integrates with smarty using a wrapper, that way you will be able to use custom classes

ghost avatar Apr 16 '18 00:04 ghost