当前位置: 首页>>代码示例>>PHP>>正文


PHP Q_Response::scriptLines方法代码示例

本文整理汇总了PHP中Q_Response::scriptLines方法的典型用法代码示例。如果您正苦于以下问题:PHP Q_Response::scriptLines方法的具体用法?PHP Q_Response::scriptLines怎么用?PHP Q_Response::scriptLines使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Q_Response的用法示例。


在下文中一共展示了Q_Response::scriptLines方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Platform_iframe_response

function Platform_iframe_response()
{
    if (empty($_POST['html'])) {
        echo "POST field 'html' is empty";
        return false;
    }
    if ($stylesheet = Q::ifset($_POST, 'stylesheet', null)) {
        Q_Response::addStylesheet($stylesheet, '@end');
    }
    $html = $_POST['html'];
    // use a regular layout, add all the scripts for Users and Streams and whatever
    // and then call Q.activate()
    // either that, or change html to a template that is rendered with handlebars in PHP
    Q_Response::addScriptLine('Q.init();', '@end');
    $stylesheets = Q_Response::stylesheets(true, "\n\t");
    $scripts = Q_Response::scripts(true, "\n\t");
    $templates = Q_Response::templates(true, "\n\t");
    $scriptLines = Q_Response::scriptLines(true);
    echo <<<EOT
<!doctype html>
<html>
    <head>
        <title>Qbix Platform</title>
\t\t{$stylesheets}
\t\t{$scripts}
\t\t<style>
\t\thtml { height: 100%; }
\t\tbody { height: 100%; }
\t\t</style>
    </head>
    <body>
\t\t<div id="Platform_parsed_html">
\t\t\t{$html}
\t\t</div>
\t\t{$scriptLines}
    </body>
</html>
EOT;
    return false;
}
开发者ID:dmitriz,项目名称:Platform,代码行数:40,代码来源:response.php

示例2:

<!-- - - - - - - - - - - - - - begin content slot- - - - - - - - - - - - - - - - -->
<?php 
echo $content;
?>
 
<!-- - - - - - - - - - - - - - - end content slot- - - - - - - - - - - - - - - - -->
		</div>
		<div id="dialogs_slot">
<!-- - - - - - - - - - - - - - begin dialogs slot- - - - - - - - - - - - - - - - -->
<?php 
echo $dialogs;
?>
 
<!-- - - - - - - - - - - - - - - end dialogs slot- - - - - - - - - - - - - - - - -->
		</div>
	</div>
	<?php 
echo Q_Response::scripts(true, "\n\t");
?>
 
	<?php 
echo Q_Response::templates(true, "\n\t");
?>
 
	<?php 
echo Q_Response::scriptLines(true);
?>
 
</body>
</html>
开发者ID:AndreyTepaykin,项目名称:Platform,代码行数:30,代码来源:mobile.php

示例3:

echo $dashboard;
?>
 
	</div>
	<?php 
if ($notices) {
    ?>
		<div id="notices_slot">
			<?php 
    echo $notices;
    ?>
		</div>
	<?php 
}
?>
	<div id="content_slot">
		<?php 
echo $content;
?>
 
	</div>
	<br style="clear: both;">
</div>

<?php 
echo Q_Html::script(Q_Response::scriptLines());
echo Q_html::script("Q.ready();");
?>
	
</fb:fbml>
开发者ID:dmitriz,项目名称:Platform,代码行数:30,代码来源:fbml.php

示例4: Q_response


//.........这里部分代码省略.........
                foreach ($slotNames as $slotName) {
                    Q_Response::fillSlot($slotName, 'default', Q::ifset($idPrefixes, $slotName, null));
                }
                // Go through the slots again, because other handlers may have overwritten
                // their contents using Q_Response::setSlot()
                foreach ($slotNames as $sn) {
                    Q_Response::fillSlot($sn, 'default', Q::ifset($idPrefixes, $slotName, null));
                }
                if (Q_Response::$redirected) {
                    // While rendering the slots we called Q_Redirect
                    $to_encode['redirect']['url'] = Q_Uri::url(Q_Response::$redirected);
                    try {
                        $to_encode['redirect']['uri'] = Q_Uri::from(Q_Response::$redirected)->toArray();
                    } catch (Exception $e) {
                        // couldn't get internal URI
                    }
                } else {
                    if (Q_Request::isLoadExtras()) {
                        $to_encode['slots'] = Q_Response::slots(true);
                        // add stylesheets, stylesinline, scripts, scriptlines, scriptdata, templates
                        foreach (array_merge(array(''), $slotNames) as $slotName) {
                            $temp = Q_Response::stylesheetsArray($slotName);
                            if ($temp) {
                                $to_encode['stylesheets'][$slotName] = $temp;
                            }
                            $temp = Q_Response::stylesInline($slotName);
                            if ($temp) {
                                $to_encode['stylesInline'][$slotName] = $temp;
                            }
                            $temp = Q_Response::scriptsArray($slotName);
                            if ($temp) {
                                $to_encode['scripts'][$slotName] = $temp;
                            }
                            $temp = Q_Response::scriptLines($slotName, true, "\n", false);
                            if ($temp) {
                                $to_encode['scriptLines'][$slotName] = $temp;
                            }
                            $temp = Q_Response::scriptData($slotName);
                            if ($temp) {
                                $to_encode['scriptData'][$slotName] = $temp;
                            }
                            $temp = Q_Response::templateData($slotName);
                            if ($temp) {
                                $to_encode['templates'][$slotName] = $temp;
                            }
                        }
                    } else {
                        $to_encode['slots'] = Q_Response::slots(true);
                        // add stylesinline, scriptlines, scriptdata, templates
                        foreach (array_merge(array(''), $slotNames) as $slotName) {
                            $temp = Q_Response::stylesInline($slotName);
                            if ($temp) {
                                $to_encode['stylesInline'][$slotName] = $temp;
                            }
                            $temp = Q_Response::scriptData($slotName);
                            if ($temp) {
                                $to_encode['scriptData'][$slotName] = $temp;
                            }
                            $temp = Q_Response::scriptLines($slotName, true, "\n", false);
                            if ($temp) {
                                $to_encode['scriptLines'][$slotName] = $temp;
                            }
                        }
                    }
                }
            }
开发者ID:atirjavid,项目名称:Platform,代码行数:67,代码来源:response.php


注:本文中的Q_Response::scriptLines方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。