tinymvc-php
tinymvc-php copied to clipboard
Pass parameters to the __construct
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?
You could try copying the way tinymvc integrates with smarty using a wrapper, that way you will be able to use custom classes