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


PHP url::get方法代码示例

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


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

示例1: url

// should be : if (!$thinkedit->isInstalled())
if (!file_exists('config/db.php')) {
    $msg = '<h1>Thinkedit is not installed. Go to the <a href="./install/">installer</a> to install it</h1>';
    //trigger_error($msg);
    echo $msg;
    die;
}
/******************* Init *******************/
//user
//thinkedit
require_once 'thinkedit.init.php';
require_once ROOT . '/class/url.class.php';
// helpers classes :
//url
$url = new url();
$cache_id = 'node_' . $url->get('node_id') . $url->get('locale');
if ($url->get('no_cache')) {
    $cache_enabled = false;
} else {
    $cache_enabled = true;
}
if ($url->get('refresh')) {
    if ($thinkedit->outputcache->get($cache_id)) {
        $thinkedit->outputcache->remove($cache_id);
    }
}
if ($url->get('clear_cache')) {
    $thinkedit->outputcache->clean();
}
if ($cache_enabled && $thinkedit->outputcache->start($cache_id)) {
    require_once ROOT . '/lib/thinkedit/template.lib.php';
开发者ID:BackupTheBerlios,项目名称:thinkedit-svn,代码行数:31,代码来源:index.php

示例2: url

 function url($path, $args = array())
 {
     return url::get($path, $args);
 }
开发者ID:gavinjx,项目名称:autophp,代码行数:4,代码来源:util.php

示例3: url

        if ($node_item->hasChildren()) {
            if (in_array($node_item->getId(), $opened_nodes)) {
                $node_info['status'] = 'opened';
            } else {
                $node_info['status'] = 'closed';
            }
        } else {
            $node_info['status'] = 'empty';
        }
        /******* append this node info to out nodes list ****/
        $out['nodes'][] = $node_info;
        $i++;
    }
}
// build a breadcrumb of parent items
// add breadcrumb
$url = new url();
$out['breadcrumb'][1]['title'] = translate('structure_title');
$out['breadcrumb'][1]['url'] = $url->render();
/************************* TEMPLATES / RENDER TO XML ****************************/
debug($out, 'OUT');
$url = new url();
if ($url->get('output') == 'xml') {
    header("Content-Type: text/xml");
    echo array_to_xml($out);
} else {
    // include template :
    include 'header.template.php';
    include 'structure.template.php';
    include 'footer.template.php';
}
开发者ID:BackupTheBerlios,项目名称:thinkedit-svn,代码行数:31,代码来源:structure.php

示例4: foreach

    $url->set('action', 'upload_file');
    $out['upload_file_url'] = $url->render();
    $childs = $filesystem->getFiles();
    if ($childs) {
        foreach ($childs as $child) {
            $item['title'] = $child->getFilename();
            $item['icon'] = $child->getIcon();
            $item['url'] = $url->render('browser.php');
            // todo default (?)
            if ($mode == 'relation') {
                $url->addObject($child, 'target_');
                $url->set('action', 'relate');
                $item['url'] = $url->render('relation.php');
            }
            if ($mode == 'field') {
                $item['field'] = $url->get('field');
                $item['value'] = $child->getPath();
            }
            $out['items'][] = $item;
        }
    }
}
/*************************** Record items ***********/
if ($class == 'table' && $type) {
    $record = $thinkedit->newRecord($type);
    $records = $record->find();
    if ($records) {
        foreach ($records as $content) {
            $item['title'] = te_short($content->getTitle(), 40);
            $item['icon'] = $content->getIcon();
            $url->addObject($content, 'target_');
开发者ID:philippejadin,项目名称:thinkedit,代码行数:31,代码来源:browser.php

示例5: foreach

$out['banner']['needed'] = true;
$out['banner']['title'] = $table_object->getTitle();
$out['banner']['message'] = $table_object->getHelp();
$out['banner']['image'] = $table_object->getIcon();
// -----------------------------
// handle plugins :
// -----------------------------
if (isset($config['config']['table'][$table]['plugin'])) {
    foreach ($config['config']['table'][$table]['plugin'] as $key => $plugin) {
        $out['plugins'][$key] = $plugin;
    }
    //print_a ($config['config']['table'][$table]['plugin']);
    //print_a ($out);
}
debug($out, 'OUT');
if ($url->get('info')) {
    $out['info'] = translate($url->get('info'));
    // todo security check in translate and in record
}
// -----------------------------
// include the templates
// -----------------------------
include 'header.template.php';
if (isset($error)) {
    include 'error.template.php';
} else {
    include 'list.template.php';
}
include 'footer.template.php';
?>
开发者ID:BackupTheBerlios,项目名称:thinkedit-svn,代码行数:30,代码来源:list.php

示例6: url

            }
            $out['node_field'][$field->getName()]['help'] = $field->getHelp();
        }
    }
}
/****************** Relations ******************/
$url = new url();
$url->addObject($record, 'source_');
$out['relation']['url'] = $url->render('relation.php');
// clean url
$url = new url();
// generates the breadcrumb data
//$out['breadcrumb'][0]['title'] = translate('home_link');
//$out['breadcrumb'][0]['url'] = 'main.php';
// if we are from a node form
if ($url->get('mode') == 'edit_node' or $url->get('mode') == 'new_node') {
    $out['breadcrumb'][1]['title'] = translate('structure');
    if ($parent = $node->getParent()) {
        $url->set('node_id', $parent->getId());
    } else {
        $url->set('node_id', $node->getId());
        //	$url->keep('node_id');
    }
    $out['breadcrumb'][1]['url'] = $url->render('structure.php');
} else {
    $out['breadcrumb'][1]['title'] = $table_object->getTitle();
    $out['breadcrumb'][1]['url'] = $url->linkTo($table_object, 'list.php');
}
$out['breadcrumb'][2]['title'] = translate('editing_link');
$out['breadcrumb'][2]['url'] = '';
// describes the banner :
开发者ID:BackupTheBerlios,项目名称:thinkedit-svn,代码行数:31,代码来源:edit.php


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