BMO calling module constructor repeatedly

Good morning.

I am new to working with BMO so hope that the below is clear and that this is the correct place to ask this sort of question.

I am working to optimise an existing module that is working (Sccp-Manager).

I have noticed that BMO is repeatedly building the same new objects, which I would like to avoid. In BMO Self_Helper autoload method, it is implied that this should not occur, but I do not see the trap to avoid this.

Is this normal expected behaviour?

Is something missing from the Module __Constructor?

Below are the traces to the 3 consecutive calls:

OUT > [2021-02-03 11:57:43] [dbug.DEBUG]: 2021-Feb-03 11:57:43 /var/www/html/admin/modules/sccp_manager/Sccp_manager.class.php:123

‘exception is’:

[] []

_[2021-02-03 11:57:43] [dbug.DEBUG]: #0 /var/www/html/admin/libraries/BMO/Self_Helper.class.php(124): FreePBX\modules\Sccp_manager->_construct(Object(FreePBX))

#1 /var/www/html/admin/libraries/BMO/Self_Helper.class.php(37): FreePBX\Self_Helper->autoLoad(‘Sccp_manager’)
_#2 /var/www/html/admin/libraries/BMO/GuiHooks.class.php(287): FreePBX\Self_Helper->_get(‘Sccp_manager’)
#3 /var/www/html/admin/libraries/BMO/GuiHooks.class.php(252): FreePBX\GuiHooks->doBMOConfigPage(‘Sccp_manager’, ‘sccp_phone’)
#4 /var/www/html/admin/config.php(445): FreePBX\GuiHooks->doConfigPageInits(‘sccp_phone’, Object(component))
#5 {main}

[] []

[2021-02-03 11:57:43] [dbug.DEBUG]: 2021-Feb-03 11:57:43 /var/www/html/admin/modules/sccp_manager/Sccp_manager.class.php:125

‘Constructor called with’:

[] []

[2021-02-03 11:57:43] [dbug.DEBUG]: FreePBX

[] []

OUT > [2021-02-03 11:57:44] [dbug.DEBUG]: 2021-Feb-03 11:57:44 /var/www/html/admin/modules/sccp_manager/Sccp_manager.class.php:123

‘exception is’:

[] []

_[2021-02-03 11:57:44] [dbug.DEBUG]: #0 /var/www/html/admin/libraries/BMO/Self_Helper.class.php(124): FreePBX\modules\Sccp_manager->_construct(Object(FreePBX\Ajax))
#1 /var/www/html/admin/libraries/BMO/Self_Helper.class.php(63): FreePBX\Self_Helper->autoLoad(‘Sccp_manager’)
#2 /var/www/html/admin/libraries/BMO/Ajax.class.php(61): FreePBX\Self_Helper->injectClass(‘Sccp_manager’, ‘/var/www/html/a…’)
#3 /var/www/html/admin/ajax.php(63): FreePBX\Ajax->doRequest(‘sccp_manager’, ‘getExtensionGri…’)
#4 {main}

[] []

[2021-02-03 11:57:44] [dbug.DEBUG]: 2021-Feb-03 11:57:44 /var/www/html/admin/modules/sccp_manager/Sccp_manager.class.php:125

‘Constructor called with’:

[] []

[2021-02-03 11:57:44] [dbug.DEBUG]: FreePBX\Ajax

[] []

[2021-02-03 11:57:44] [dbug.DEBUG]: 2021-Feb-03 11:57:44 /var/www/html/admin/modules/sccp_manager/Sccp_manager.class.php:123

‘exception is’:

[] []

_[2021-02-03 11:57:44] [dbug.DEBUG]: #0 /var/www/html/admin/libraries/BMO/Self_Helper.class.php(124): FreePBX\modules\Sccp_manager->_construct(Object(FreePBX\Ajax))
#1 /var/www/html/admin/libraries/BMO/Self_Helper.class.php(63): FreePBX\Self_Helper->autoLoad(‘Sccp_manager’)
#2 /var/www/html/admin/libraries/BMO/Ajax.class.php(61): FreePBX\Self_Helper->injectClass(‘Sccp_manager’, ‘/var/www/html/a…’)
#3 /var/www/html/admin/ajax.php(63): FreePBX\Ajax->doRequest(‘sccp_manager’, ‘getPhoneGrid’)
#4 {main}

[] []

[2021-02-03 11:57:44] [dbug.DEBUG]: 2021-Feb-03 11:57:44 /var/www/html/admin/modules/sccp_manager/Sccp_manager.class.php:125

‘Constructor called with’:

[] []

[2021-02-03 11:57:44] [dbug.DEBUG]: FreePBX\Ajax

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.