Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2017-03-31 15:37:33

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 741
Website

call a method in a callback

Hi,
Is there a way to do something like that:

register_callback('Class::method()', 'plugin_lifecycle.abc_plugin', 'enabled');

I get the following error when enabling the plugin:

Sorry, the form could not be submitted. Please try again later.

Thanks…

Last edited by NicolasGraph (2017-03-31 15:39:57)


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#2 2017-03-31 15:52:32

etc
Developer
Registered: 2010-11-11
Posts: 2,182
Website

Re: call a method in a callback

Hi Nicolas, 'Class::method' (without parentheses) should work in php 5.3+, though I haven’t tested.


etc_[ query | search | pagination | date | tree | cache ]

Offline

#3 2017-03-31 16:06:04

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 741
Website

Re: call a method in a callback

etc wrote #305173:

Hi Nicolas, 'Class::method' (without parentheses) should work in php 5.3+, though I haven’t tested.

Ok, I can’t make it work for now; I’ll investigate next week. Thanks Oleg.


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#4 2017-03-31 16:32:33

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 741
Website

Re: call a method in a callback

You are right Oleg, it works in minimal test.


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

Board footer

Powered by FluxBB