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


PHP URI::build方法代码示例

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


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

示例1: main

 public function main()
 {
     $page = Request::get(0, VAR_URI);
     if (preg_match('/^(\\d+)-/', $page, $matches) > 0 && !empty($matches[1])) {
         $airlineData = new CustomData($this->airlinePage->getPosition());
         if ($airlineData->load($matches[1])) {
             $uri = AirlineTools::buildUri($airlineData->getId(), $airlineData->getData('name'), true);
             $this->flightPage->setBaseUri($uri);
             $this->breadcrumb->add($airlineData->getData('name'), URI::build($uri));
             $flight = Request::get(1, VAR_INT);
             if (is_id($flight)) {
                 $this->flight($flight);
             } else {
                 $this->airline($matches[1]);
             }
         } else {
             $this->header();
             $this->notFoundError();
             $this->footer();
         }
     } else {
         $this->header();
         $this->airlinePage->overview('/Airlines/categories');
         $this->footer();
     }
 }
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:26,代码来源:class.AirlinePages.php

示例2: __construct

 public function __construct()
 {
     parent::__construct();
     $this->breadcrumb->add('Bewertungen', URI::build('airlines/admin/evals'));
     $this->breadcrumb->add('Kategorien', URI::build('airlines/admin/categories'));
     $this->breadcrumb->add('Felder', URI::build('airlines/admin/cfields'));
 }
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:7,代码来源:class.AdminAirlinesFieldPages.php

示例3: buildUri

 public static function buildUri($id, $name, $raw = false)
 {
     $uri = 'airlines/airlines/' . $id . '-' . URI::clean($name);
     if (!$raw) {
         $uri = URI::build($uri);
     }
     return $uri;
 }
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:8,代码来源:class.AirlineTools.php

示例4: parse

 private function parse($page)
 {
     // URI conversion, example: [@uri:/cms/contact]
     $page = preg_replace_callback('~\\[@uri:([^]]+)\\]~i', function ($m) {
         return URI::build($m[1]);
     }, $page);
     return $page;
 }
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:8,代码来源:class.ContentPages.php

示例5: __construct

 public function __construct($package = 'Cms')
 {
     parent::__construct($package);
     $this->scriptFiles[URI::build('client/scripts/jquery/jquery.admin.js')] = 'text/javascript';
     $this->scriptFiles[URI::build('client/scripts/admin.js')] = 'text/javascript';
     $this->cssFiles[URI::build('client/styles/admin.css')] = 'all';
     $this->loadMenu();
     $this->breadcrumb->add('Administrationsbereich', URI::build('cms/admin'));
 }
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:9,代码来源:class.AdminModuleObject.php

示例6: getMenu

 public function getMenu($class)
 {
     switch ($class) {
         case 'Cms.Modules.AdminDocPages':
             return array(URI::build('cms/admin/documents') => 'Übersicht', URI::build('cms/admin/documents/write') => 'Hinzufügen');
         case 'Cms.Modules.AdminMemberPages':
             return array(URI::build('cms/admin/members') => 'Übersicht', URI::build('cms/admin/members/groups') => 'Gruppen', URI::build('cms/admin/members/emailexport') => 'E-Mail-Adressen exportieren');
         default:
             return array(URI::build('cms/admin/sys') => 'Startseite', URI::build('cms/admin/sys/serverinfo') => 'Server-Info');
     }
 }
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:11,代码来源:class.AdminCmsMenu.php

示例7: __construct

 public function __construct($package = 'Cms')
 {
     parent::__construct($package);
     $cache = Core::getObject('Core.Cache.CacheServer');
     $cache->setSourceDir('Cms.Cache.Items');
     // URL => content for media-attribute
     $this->cssFiles = array(URI::build('client/styles/stylesheet.css') => 'all');
     // URL => content for type-attribute
     $cdn = Config::get('ui.jquery_cdn');
     $this->scriptFiles = array(URI::build($cdn ? $cdn : 'client/scripts/jquery/jquery.js') => 'text/javascript', URI::build('client/scripts/jquery/jquery.plugins.js') => 'text/javascript');
     // Html to be placed into the head tag of the page (at last)
     $this->headHtml = array();
     Session::getObject();
     // Init session
     $this->breadcrumb = new Breadcrumb();
     $this->breadcrumb->add(Config::get('general.title'), URI::frontPage());
 }
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:17,代码来源:class.CmsModuleObject.php

示例8: delete

 public function delete()
 {
     $this->breadcrumb->add("Löschen");
     $this->header();
     $id = Request::get(1, VAR_INT);
     if (Request::get(2) == 'yes') {
         try {
             Database::getObject()->query("DELETE FROM <p>airports WHERE id = <id:int>", compact("id"));
             CmsPage::ok("Der gewählte Airport wurde gelöscht.");
         } catch (QueryException $e) {
             CmsPage::error("Der gewählte Airport konnte leider nicht gelöscht werden. Möglicherweise referenzieren noch andere Daten auf diesen Airport.");
         }
         $this->show();
     } else {
         CmsPage::yesNo("Möchten Sie den ausgewählten Airport wirklich löschen?", URI::build('airlines/admin/airports/delete/' . $id . '/yes'), URI::build('airlines/admin/airports'));
     }
     $this->footer();
 }
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:18,代码来源:class.AdminAirportPages.php

示例9: write

 public function write()
 {
     $db = Database::getObject();
     $id = Request::get(1, VAR_INT);
     $action = Request::get(2, VAR_URI);
     $options = array('title' => array(Validator::MESSAGE => 'Der Name muss mindestens 2 und darf maximal 255 Zeichen lang sein.', Validator::MIN_LENGTH => 2, Validator::MAX_LENGTH => 255), 'uri' => array(Validator::MULTIPLE => array(array(Validator::MESSAGE => 'Die URI enthält Zeichen die nicht erlaubt sind. Erlaubt sind: a-z, 0-9, _, -', Validator::REGEXP => '/^[\\w\\d\\-]*$/i'), array(Validator::MESSAGE => 'Die angegebene URI existiert bereits für eine andere Seite.', Validator::CLOSURE => function ($uri) use($db, $id) {
         $db->query("SELECT uri FROM <p>page WHERE id != <id:int> AND uri = <uri>", compact("id", "uri"));
         return $db->numRows() == 0;
     }))), 'content' => array(Validator::OPTIONAL => true));
     $this->breadcrumb->add(iif($id > 0, "Bearbeiten", "Hinzufügen"));
     $this->scriptFiles[URI::build('client/scripts/wymeditor/jquery.wymeditor.js')] = 'text/javascript';
     $this->header();
     $data = array('id' => $id, 'title' => '', 'uri' => '', 'content' => '');
     if ($action == 'send') {
         extract(Validator::checkRequest($options));
         $data['id'] = $id;
         if (count($error) > 0) {
             CmsPage::error($error);
         } else {
             if ($id > 0) {
                 $db->query("UPDATE <p>page SET title = <title>, uri = <uri>, content = <content> WHERE id = <id:int>", $data);
             } else {
                 $db->query("INSERT INTO <p>page SET title = <title>, uri = <uri>, content = <content>", $data);
                 $data['id'] = $db->insertId();
             }
             CmsPage::ok("Die Seite wurde erfolgreich gespeichert.");
         }
     } else {
         if ($id > 0) {
             $db->query("SELECT id, title, uri, content FROM <p>page WHERE id = <id:int>", compact("id"));
             if ($db->numRows() == 1) {
                 $data = $db->fetchAssoc();
             }
         }
     }
     $tpl = Response::getObject()->appendTemplate('Cms/admin/docs_write');
     $tpl->assign('data', $data);
     $tpl->output();
     $this->footer();
 }
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:40,代码来源:class.AdminDocPages.php

示例10: createUri

 protected function createUri($pageNo)
 {
     $uri = $this->uri;
     if ($this->isQueryMode()) {
         $query = parse_url($uri, PHP_URL_QUERY);
         if (empty($query)) {
             $uri .= '?';
         } else {
             $uri .= '&';
         }
     } else {
         $uri = $uri . '/';
     }
     $uri .= str_replace('$$', $pageNo, $this->appendix);
     return URI::build($uri);
 }
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:16,代码来源:class.Pagination.php

示例11: getThumbnail

 public function getThumbnail()
 {
     return URI::build($this->thumb);
 }
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:4,代码来源:class.CustomImageSlider.php

示例12: __construct

 public function __construct()
 {
     parent::__construct('Airlines.DataFields.Positions.AirlinesCategoryPosition', 'airlines/admin/categories', array('name', 'code'), 'Airlines');
     $this->breadcrumb->add('Bewertungen', URI::build('airlines/admin/evals'));
     $this->breadcrumb->add('Kategorien', URI::build('airlines/admin/categories'));
 }
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:6,代码来源:class.AdminAirlinesPages.php

示例13: delete

 public function delete()
 {
     $this->breadcrumb->add("Löschen");
     $this->header();
     $id = Request::get(1, VAR_INT);
     if (Request::get(2) == 'yes') {
         $db = Database::getObject();
         try {
             $db->query("DELETE FROM <p>user WHERE id = <id:int>", compact("id"));
             CmsPage::ok("Das gewählte Mitglied wurde gelöscht.");
         } catch (QueryException $e) {
             CmsPage::error("Das gewählte Mitglied konnte leider nicht gelöscht werden. Möglicherweise referenzieren noch Daten auf dieses Mitglied.");
         }
         $this->members();
     } else {
         CmsPage::yesNo("Möchten Sie das gewählte Mitglied wirklich löschen?", URI::build('cms/admin/members/delete/' . $id . '/yes'), URI::build('cms/admin/members'));
     }
     $this->footer();
 }
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:19,代码来源:class.AdminMemberPages.php

示例14: pwverify

 public function pwverify()
 {
     $this->breadcrumb->add('Neues Passwort generieren');
     $this->header();
     if (Me::get()->loggedIn()) {
         CmsPage::error('Sie sind bereits angemeldet!');
     } else {
         $uid = Request::get(1, VAR_INT);
         $hash = Request::get(2, VAR_ALNUM);
         $user = UserUtils::getById($uid);
         if ($user !== null && $user->isActive() && strcmp($hash, $user->getVerificationCode()) == 0) {
             $pw = Password::generate();
             $pwh = Hash::generate($pw);
             $db = Database::getObject();
             $db->query("UPDATE <p>user SET pw = <pwh>, verification = '' WHERE id = <uid:int>", compact("uid", "pwh"));
             if ($db->affectedRows() == 1) {
                 $db = Database::getObject();
                 $db->query("UPDATE <p>user SET verification = <pwh> WHERE id = <uid:int> AND active = 1", compact("pwh", "uid"));
                 $tpl = Response::getObject()->getTemplate('Cms/mails/pwremind_newpw');
                 $tpl->assign('pw', $pw, false);
                 $tpl->assign('name', UserUtils::getSalutation($user->getGender(), $user->getForeName(), $user->getSurName()), false);
                 CmsTools::sendMail($user->getEmail(), Config::get('general.title') . ': Ihr neues Passwort', $tpl->parse());
                 CmsPage::ok("Ihr neues Passwort wurden Ihnen per E-Mail zugeschicht.", URI::build("cms/user/login"));
             } else {
                 CmsPage::error("Es ist ein Fehler bei der Generierung eines neuen Passworts aufgetreten. Bitte wernden Sie sich an den Systemadministrator.", URI::build("cms/contact"));
             }
         } else {
             CmsPage::error("Die angegebenen Daten sind nicht mehr gültig.", URI::build("cms/user/pwremind"));
         }
     }
     $this->footer();
 }
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:32,代码来源:class.UserPages.php

示例15: printf

	</div>
	<div class="mid">
		<a href="<?=URI::build($params + ['filter'=>"voting"])?>" title="<?
printf(_("%d issues in voting, %d in voting preparation and %d in counting phase"), $counts['voting'], $counts['preparation'], $counts['counting']);
$nyvic = $ngroup->not_yet_voted_issues_count();
if ($nyvic) { ?> &mdash; <?=Ngroup::not_yet_voted($nyvic); }
?>"<?
if ($filter=="voting") { ?> class="active"<? }
?>><?=_("Voting")?> (<?=($counts['voting']+$counts['preparation']+$counts['counting']);
if ($nyvic) { ?>, <? printf(_("not voted on %d"), $nyvic); }
?>)</a>
	</div>
</div>
<div class="top">
	<div class="mid_dummy">
		<a href="<?=URI::build($params + ['filter'=>"closed"])?>" title="<?
printf(_("%d issues are finished, %d issues are cancelled"), $counts['finished'], $counts['cancelled']);
?>" class="top<?
if ($filter=="closed") { ?> active<? }
?>"><?=_("closed")?> (<?=($counts['finished']+$counts['cancelled'])?>)</a>
	</div>
</div>
<form id="search" action="<?=BN?>" method="GET">
<?
input_hidden('ngroup', $ngroup->id);
if ($filter) input_hidden("filter", $filter);
?>
<?=_("Search")?>: <input type="search" name="search" value="<?=h($search)?>">
<input type="submit" value="<?=_("search")?>">
<a href="<?=URI::strip(['search'])?>"><?=_("reset")?></a>
</form>
开发者ID:ppschweiz,项目名称:basisentscheid,代码行数:31,代码来源:proposals.php


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