Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass parameters to the __construct #10

Open
Sa1ch opened this issue May 2, 2017 · 1 comment
Open

Pass parameters to the __construct #10

Sa1ch opened this issue May 2, 2017 · 1 comment

Comments

@Sa1ch
Copy link

Sa1ch commented May 2, 2017

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?

@ghost
Copy link

ghost commented Apr 16, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant