本文整理匯總了PHP中Region::render方法的典型用法代碼示例。如果您正苦於以下問題:PHP Region::render方法的具體用法?PHP Region::render怎麽用?PHP Region::render使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Region
的用法示例。
在下文中一共展示了Region::render方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: Page
define('INCLUDES_PATH', CORE_PATH . DS . "includes");
define('PLUGINS_PATH', BASE_PATH . DS . "plugins");
define('CLASSES_PATH', CORE_PATH . DS . "classes");
define('THEMES_PATH', BASE_PATH . DS . "themes");
require_once INCLUDES_PATH . DS . "functions.php";
require_once INCLUDES_PATH . DS . "config.php";
$registry = Registry::getInstance();
$page = new Page();
$page->setTitle('Magus v2.0: Electric Boogaloo');
$page->setTheme('default');
//Leave in for dependency injection. Get the theme
//var from registry when it's available
$page->setRegion('header', "Magus v2.0: Electric Boogaloo");
$page->setRegion('left_sidebar', "Tada!!!");
$page->setRegion('right_sidebar', "Wicked");
$page->setRegion('footer', "BAM!! Footer");
$left_sidebar = new Region();
$template = new Template();
$template->setPath(THEMES_PATH . DS . $registry->setting('theme') . DS . "templates");
$template->setTemplate('danfro');
$left_sidebar->addPlugin('Template', $template, 8);
$template = new Template();
$template->setPath(THEMES_PATH . DS . $registry->setting('theme') . DS . "templates");
$template->setTemplate('test_subject');
$left_sidebar->addPlugin('Template', $template, 6);
/*$left_sidebar->addPlugin('test', 0, 'Stuff', array('test', 'nothin'), 'relaxed', 1121);
$left_sidebar->addPlugin('newtest', 50, "other stuff");
$left_sidebar->addPlugin('third_test', 10, "more stuff");
$left_sidebar->addPlugin('forth_test', 5, "forth stuff");*/
$page->setRegion('left_sidebar', $left_sidebar->render());
print $page->render();