Jestem początkujący w PHP. Tworzę prosty skrypt do zarządzania treścią i mam problem z klasami i require_once.

core.php
... require_once INCLUDES."core_include.php"; $_CORE = new core; require_once INCLUDES."theme_include.php"; $_THEME = new theme; ...
example.php
require_once "core.php"; $site_main = "test"; $_THEME->buildTheme($site_main, null, null);
theme_include.php
class Theme{ public function buildTheme($site_main){ include THEMES.$_CORE->getSetting("theme")."/main.php"; } ...
Błąd:
Notice: Undefined variable: _CORE in C:\apache\htdocs\includes\theme_include.php on line 11 Fatal error: Call to a member function getSetting() on a non-object in C:\apache\htdocs\includes\theme_include.php on line 11
Mój błąd leży w przekazywaniu zmiennych i obiektów zawartych w pliku core.php do innych plików i nie wiem zbytnio co robić. Prosiłbym o porady.