/** * The one and only constructor for all subclasses. * * These must not implement a constructor but the __initialize method. */ function __construct() { if (!hook_already_fired(HOOK_PRE_RENDER)) { register_hook(HOOK_PRE_RENDER, $this, "PreRender"); } else { if (!hook_already_fired(HOOK_POST_EXECUTE)) { register_hook(HOOK_POST_EXECUTE, $this, "PreRender"); } } if (!unserializer_active()) { create_storage_id($this); $args = func_get_args(); if (count($args) != 1 || $args[0] !== 'Make is calling so skip __initialize call') { system_call_user_func_array_byref($this, '__initialize', $args); } } }
/** * Override this method instead of writing a constructor. * * @param string $file Template file for this class. Usually '' (empty string) */ function __initialize($file = "") { $this->file = $file; if (!unserializer_active()) { create_storage_id($this); $this->set('id', $this->_storage_id); } }