本文整理汇总了PHP中Canvas::get_project_id方法的典型用法代码示例。如果您正苦于以下问题:PHP Canvas::get_project_id方法的具体用法?PHP Canvas::get_project_id怎么用?PHP Canvas::get_project_id使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Canvas
的用法示例。
在下文中一共展示了Canvas::get_project_id方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: CanvasConfig
?>
<?php
$config = new CanvasConfig();
$canvas = null;
//var_dump($config->get("APP_TYPE"));
if ($config->get("APP_TYPE") == "PROJECT_JS") {
include 'canvas-project-js.php';
$canvas = new CanvasProjectJS($config);
} else {
include 'canvas.php';
$canvas = new Canvas($config);
}
if (isset($_POST['action'])) {
$optimizely = $canvas->get_optimizely();
$project = $optimizely->get_project($canvas->get_project_id());
}
if (isset($_POST['action']) && $_POST['action'] == "disable") {
$canvas->disable($project);
} else {
if (isset($_POST['action']) && $_POST['action'] == "enable") {
$canvas->enable($project);
}
}
if ($config->get("MAIN") == null) {
$main = 'canvas-content.php';
} else {
$main = $config->get("MAIN");
}
if ($config->get("SIDEBAR") != null) {
$sidebar = $config->get("SIDEBAR");