本文整理汇总了PHP中Q_Response::stylesheetsArray方法的典型用法代码示例。如果您正苦于以下问题:PHP Q_Response::stylesheetsArray方法的具体用法?PHP Q_Response::stylesheetsArray怎么用?PHP Q_Response::stylesheetsArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Q_Response
的用法示例。
在下文中一共展示了Q_Response::stylesheetsArray方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Q_response
//.........这里部分代码省略.........
if ($isAjax) {
$to_encode = array();
if (Q_Response::$redirected) {
// We already called Q_Response::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 (is_array($slotNames)) {
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;
}