本文整理汇总了PHP中Manager::getStaticURL方法的典型用法代码示例。如果您正苦于以下问题:PHP Manager::getStaticURL方法的具体用法?PHP Manager::getStaticURL怎么用?PHP Manager::getStaticURL使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Manager
的用法示例。
在下文中一共展示了Manager::getStaticURL方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getHref
public static function getHref($href)
{
if ($href != '') {
if ($href[0] == '#') {
$href = Manager::getStaticURL(Manager::getApp(), substr($href, 1));
} else {
$href = MAction::getHrefAction($href);
}
}
return $href;
}
示例2: buildURL
public function buildURL($action = '', $parameters = array())
{
//mtrace('buildURL = ' . $action);
//mtrace($parameters);
$app = Manager::getApp();
$module = Manager::getModule();
if ($action[0] == '@') {
$url = Manager::getAppURL($app);
$action = substr($action, 1);
} elseif ($action[0] == '>') {
$url = Manager::getAppURL($app);
$action = substr($action, 1);
} elseif ($action[0] == '#') {
$url = Manager::getStaticURL();
$action = substr($action, 1);
} else {
$url = Manager::getAppURL($app);
}
//mtrace('url = '. $url);
$path = '';
//mtrace("============== buildURL ============");
//mtrace('*action = ' . $action);
if ($p = strpos($action, '/')) {
$index = substr($action, 0, $p);
$action = substr($action, $p + 1);
} else {
$index = $module != '' ? $module : $app;
}
// mtrace('index = ' . $index);
// mtrace('action = ' . $action);
//$action = str_replace('.','/', $action);
$path = '/' . $action;
// mtrace('*index = ' . $index);
// mtrace('app = ' . $app);
if ($index != $app) {
$path = '/' . $index . $path;
}
//mtrace('*path = ' . $path);
if (count($parameters)) {
$query = http_build_query($parameters);
$path .= (strpos($path, '?') === false ? '?' : '') . $query;
}
$url .= $path;
//mtrace('url = ' . $url);
//mtrace("============ end getURL ============");
return $url;
}
示例3: formImagens
public function formImagens()
{
$this->data->location = Manager::getStaticURL('exemplos', 'images/logo.png');
$this->data->icon = Manager::getStaticURL('exemplos', 'images/16x16/find.png');
$this->render();
}
示例4: helper_image
function helper_image($matches)
{
$m = explode('|', $matches[1]);
$source = Manager::getStaticURL('', 'images/' . $m[0], true);
$image = new MImage('', '', '', $source);
// return '<a ' . $class . ' href="/' . $target . '">' . $text . '</a>';
return $image->generate();
}
示例5: formAjaxControls
public function formAjaxControls()
{
$this->data->pessoas = Pessoa::create()->listAll()->asQuery()->chunkResult();
$this->data->toolButton = "What.";
$this->data->location = Manager::getStaticURL("exemplos", "images/logo.png");
$this->render();
}