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


PHP Response::getObject方法代码示例

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


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

示例1: footer

 protected function footer()
 {
     $tpl = Response::getObject()->appendTemplate("/Cms/admin/footer");
     $tpl->assign('menu', $this->menu, false);
     $tpl->output();
     parent::footer();
 }
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:7,代码来源:class.AdminModuleObject.php

示例2: contact

 private function contact()
 {
     $isSent = Request::get(0, VAR_URI) == 'send';
     $options = array('name' => array(Validator::MESSAGE => 'Der Name muss mindestens 5 und darf maximal 150 Zeichen lang sein.', Validator::MIN_LENGTH => 5, Validator::MAX_LENGTH => 150), 'email' => array(Validator::MESSAGE => 'Die E-Mail-Adresse ist nicht korrekt.', Validator::CALLBACK => Validator::CB_MAIL), 'message' => array(Validator::MESSAGE => 'Die Nachricht entspricht nicht den Vorgaben (mindestens 10 Zeichen, maximal 1000 Zeichen).', Validator::MIN_LENGTH => 10, Validator::MAX_LENGTH => 1000), 'title' => array(Validator::MESSAGE => 'Der Titel entspricht nicht den Vorgaben (mindestens 5 Zeichen, maximal 100 Zeichen).', Validator::MIN_LENGTH => 5, Validator::MAX_LENGTH => 100));
     $this->enableClientFormValidation($options);
     // Don't validate the captcha via ajax as the session would end
     if (Config::get('captcha.enable')) {
         Core::loadClass('Core.Security.ReCaptcha');
         $options['recaptcha_response_field'] = array(Validator::MESSAGE => 'Der Sicherheitscode wurde nicht korrekt eingegeben.', Validator::CALLBACK => 'cb_captcha_check');
     }
     $data = array_fill_keys(array_keys($options), '');
     $data['name'] = iif(Me::get()->loggedIn(), Me::get()->getName());
     $data['email'] = iif(Me::get()->loggedIn(), Me::get()->getEmail());
     $this->breadcrumb->add('Kontakt');
     $this->header();
     if ($isSent) {
         extract(Validator::checkRequest($options));
         if (count($error) > 0) {
             CmsPage::error($error);
         } else {
             CmsTools::sendMail(Config::get('general.email'), $data['title'], $data['message'], $data['email'], $data['name']);
             CmsPage::ok('Die Anfrage wurde erfolgreich verschickt. Vielen Dank!');
             $data['title'] = '';
             $data['message'] = '';
         }
     }
     $tpl = Response::getObject()->appendTemplate('Cms/contact/contact');
     $tpl->assign('data', $data);
     if (Config::get('captcha.enable')) {
         $tpl->assign('captcha', recaptcha_get_html(Config::get('captcha.public_key')), false);
     }
     $tpl->output();
     $this->footer();
 }
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:34,代码来源:class.ContactPages.php

示例3: setCookie

 protected function setCookie($email = '', $pw = '')
 {
     if (empty($email) || empty($pw)) {
         Response::getObject()->sendCookie('udata', "", 0, true);
     } else {
         // Cookie-Laufzeit: 365 Tage
         Response::getObject()->sendCookie('udata', "{$email}|{$pw}", 60 * 60 * 24 * 365, true);
     }
 }
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:9,代码来源:class.Authentication.php

示例4: ok

 public static function ok($message, $url = null)
 {
     if (!is_array($message)) {
         $message = array($message);
     }
     $tpl = Response::getObject()->appendTemplate('/Cms/ok');
     $tpl->assign('url', $url);
     $tpl->assign('message', $message);
     $tpl->output();
 }
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:10,代码来源:class.CmsPage.php

示例5: show

 protected function show()
 {
     $db = Database::getObject();
     $tpl = Response::getObject()->appendTemplate("Airlines/admin/airports");
     $country = Request::get('country', VAR_NONE, 'Schweiz');
     $tpl->assign('country', $country);
     $db->query("SELECT * FROM <p>airports " . iif(!empty($country), "WHERE land = <country>") . " ORDER BY land, stadt, flughafen", compact("country"));
     $tpl->assign('data', $db->fetchAll());
     $db->query("SELECT DISTINCT land FROM <p>airports ORDER BY land");
     $tpl->assign('countries', $db->fetchAll(null, null, 'land'));
     $tpl->output();
 }
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:12,代码来源:class.AdminAirportPages.php

示例6: serverinfo

 public function serverinfo()
 {
     ob_start();
     phpinfo();
     preg_match("~<body.*?>(.+?)</body>~is", ob_get_contents(), $match_body);
     ob_end_clean();
     $this->breadcrumb->Add("Serverinfo");
     $this->header();
     $tpl = Response::getObject()->getTemplate("/Cms/admin/serverinfo");
     $tpl->assign('content', $match_body[0], false);
     $tpl->output();
     $this->footer();
 }
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:13,代码来源:class.AdminDefaultPages.php

示例7: suggest

 public function suggest()
 {
     $data = array();
     $id = Request::get(1, VAR_INT);
     $q = Request::get('q');
     $q = SystemEnvironment::fromUtf8($q);
     $db = Database::getObject();
     $db->query("SELECT * FROM <p>fields WHERE id = <id:int>", compact("id"));
     if ($db->numRows() == 1) {
         $field = CustomField::constructObject($db->fetchAssoc());
         if ($field instanceof CustomAutoCompleteTextField) {
             $data = $field->getList($q);
         }
     }
     Response::getObject()->sendHeader('Content-Type: text/plain; charset=' . Config::get('intl.charset'));
     echo implode("\n", $data);
 }
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:17,代码来源:class.BackendPages.php

示例8: airline

 protected function airline($id)
 {
     $this->breadcrumb->resetUrl();
     $this->header();
     // Airline details
     $this->airlinePage->detail($id, '/Airlines/airline');
     // Airline average ratings
     $avgFields = CustomRating::getAverageFields($this->flightPage->getPosition(), array('airline' => $id, 'published' => 1));
     $tpl = Response::getObject()->appendTemplate('/Airlines/airline_avg');
     $tpl->assign('data', $avgFields, false);
     $tpl->output();
     // Evaluated flights
     $filter = new CustomDataFilter($this->flightPage->getPosition());
     $filter->field('title');
     $filter->fieldCalculation('rating', '(vdr_rating+bord_rating+service_rating)/3');
     $filter->condition('airline', $id);
     $filter->condition('published', 1);
     $filter->orderBy('date');
     $this->flightPage->overview('/Airlines/flights', Config::get('pagination.evaluations'), $filter);
     $this->footer();
 }
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:21,代码来源:class.AirlinePages.php

示例9: output

 protected function output(CustomFieldData $field, $label)
 {
     if ($field == null) {
         return '';
     } else {
         $tpl = Response::getObject()->getTemplate($this->getOutputTemplate());
         $tpl->assign('field', $field, false);
         $tpl->assign('output', $field->getOutputCode(), false);
         $tpl->assign('label', $label, false);
         return $tpl->parse();
     }
 }
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:12,代码来源:class.CustomData.php

示例10: overview

 public function overview($tpl = null, $pagination = 0, CustomDataFilter $filter = null)
 {
     if ($filter === null) {
         $filter = new CustomDataFilter($this->position);
         foreach ($this->mainFields as $field) {
             $filter->field($field);
         }
         $filter->orderBy(reset($this->mainFields));
     }
     $pages = '';
     if ($pagination > 0) {
         $pg = new Pagination($pagination, $filter->getAmount());
         $pg->setUri($this->baseUri);
         $pg->parsePage();
         $filter->limit($pg->getPerPage(), $pg->getOffset());
         $pages = $pg->build();
     }
     $tpl = Response::getObject()->appendTemplate($tpl ? $tpl : "/Cms/fields/data_categories");
     $tpl->assign('pages', $pages, false);
     $tpl->assign('list', $filter->retrieveList(), false);
     $tpl->assign('baseUri', $this->baseUri);
     $tpl->output();
 }
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:23,代码来源:class.FieldDataPages.php

示例11: overview

 protected function overview()
 {
     foreach ($this->getPositions() as $p) {
         $cache = Core::getObject('Core.Cache.CacheServer')->load('fields');
         $tpl = Response::getObject()->appendTemplate("/Cms/admin/fields");
         $tpl->assign("data", $cache->getFields($p), false);
         $tpl->assign('baseUri', $this->getBaseURI());
         $tpl->output();
     }
 }
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:10,代码来源:class.AdminFieldPages.php

示例12: getStarOutputCode

 public static function getStarOutputCode($data, $min = 0, $max = 5, $step = 0.5)
 {
     $nearest = self::findNearestStep($data, $min, $max, $step);
     $fullStars = intval($nearest);
     $halfStar = $nearest != $fullStars;
     $tpl = Response::getObject()->getTemplate('/Cms/bits/rating/output');
     $tpl->assignMultiple(compact("fullStars", "halfStar", "data", "min", "max"));
     return $tpl->parse();
 }
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:9,代码来源:class.CustomRating.php

示例13: setSID

 private function setSID($sid)
 {
     $this->sid = $sid;
     Response::getObject()->sendCookie('sid', $sid, 60 * Config::get('security.session_lifetime'), true);
 }
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:5,代码来源:class.Session.php

示例14: footer

 protected function footer()
 {
     $tpl = Response::getObject()->appendTemplate('/Cms/footer');
     $tpl->assign('breadcrumb', $this->breadcrumb, false);
     $tpl->output();
 }
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:6,代码来源:class.CmsModuleObject.php

示例15: getCodeImpl

 protected function getCodeImpl($file, $additionalVars = array())
 {
     $tpl = Response::getObject()->getTemplate($file);
     $tpl->assign('fieldId', $this->getId());
     $tpl->assign('field', $this->getFieldName());
     $tpl->assign('title', $this->getName());
     $tpl->assign('description', $this->getDescription());
     $tpl->assign('params', $this->getParamsData());
     $tpl->assignMultiple($additionalVars);
     return $tpl->parse();
 }
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:11,代码来源:class.CustomField.php


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