require_once'modules/logger.php';
$Logger = new Logger();
require_once 'templates/list.php';
$Templates = new templatesList();
require_once 'widgets/list.php';
$Widgets = new widgetsList();
I use $Logger
in templates/list.php
and in widgets/list.php
.
$Templates
I use in /widgets/list.php
.
The code above throws this error:
Notice: Undefined variable:
Logger
in.../templates/list.php
on line 99 Fatal error: Call to a member functiontoLog()
on a non-object in.../templates/list.php
on line 99
UPD Here is line 99:
$Logger->toLog( $contentData );