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


PHP Horde::startBuffer方法代码示例

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


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

示例1: status

 /**
  */
 public function status()
 {
     global $notification;
     Horde::startBuffer();
     $notification->notify(array('listeners' => array('status', 'audio')));
     return Horde::endBuffer();
 }
开发者ID:DSNS-LAB,项目名称:Dmail,代码行数:9,代码来源:Base.php

示例2: _getOtherGalleries

 /**
  * Build the HTML for the other galleries widget content.
  *
  * @param Horde_View $view  The view object.
  */
 protected function _getOtherGalleries(&$view)
 {
     $owner = $this->_view->gallery->get('owner');
     // Set up the tree
     $tree = $GLOBALS['injector']->getInstance('Horde_Core_Factory_Tree')->create('otherAnselGalleries_' . md5($owner), 'Javascript', array('class' => 'anselWidgets'));
     try {
         $galleries = $GLOBALS['injector']->getInstance('Ansel_Storage')->listGalleries(array('attributes' => $owner));
     } catch (Ansel_Exception $e) {
         Horde::log($e, 'ERR');
         return;
     }
     foreach ($galleries as $gallery) {
         $parents = $gallery->get('parents');
         if (empty($parents)) {
             $parent = null;
         } else {
             $parents = explode(':', $parents);
             $parent = array_pop($parents);
         }
         $img = (string) Ansel::getImageUrl($gallery->getKeyImage(Ansel::getStyleDefinition('ansel_default')), 'mini', true);
         $link = Ansel::getUrlFor('view', array('gallery' => $gallery->id, 'slug' => $gallery->get('slug'), 'view' => 'Gallery'), true);
         $tree->addNode(array('id' => $gallery->id, 'parent' => $parent, 'label' => $gallery->get('name'), 'expanded' => $gallery->id == $this->_view->gallery->id, 'params' => array('icon' => $img, 'url' => $link)));
     }
     Horde::startBuffer();
     $tree->sort('label');
     $tree->renderTree();
     $view->tree = Horde::endBuffer();
     $GLOBALS['injector']->getInstance('Horde_Core_Factory_Imple')->create('Ansel_Ajax_Imple_ToggleOtherGalleries', array('id' => 'othergalleries-toggle'));
 }
开发者ID:horde,项目名称:horde,代码行数:34,代码来源:OtherGalleries.php

示例3: _handle

 /**
  */
 protected function _handle(Horde_Variables $vars)
 {
     global $injector, $prefs;
     $faces = $injector->getInstance('Ansel_Faces');
     $image_id = intval($vars->image_id);
     $results = $faces->getImageFacesData($image_id);
     // Attempt to get faces from the picture if we don't already have
     // results, or if we were asked to explicitly try again.
     if (empty($results)) {
         $image = $injector->getInstance('Ansel_Storage')->getImage($image_id);
         $image->createView('screen', null, $prefs->getValue('watermark_auto') ? $prefs->getValue('watermark_text', '') : '');
         $results = $faces->getFromPicture($image_id, true);
     }
     if (empty($results)) {
         $results = new stdClass();
         $results->response = _("No faces found");
         return new Horde_Core_Ajax_Response($results);
     }
     $customurl = Horde::url('faces/custom.php');
     Horde::startBuffer();
     include ANSEL_TEMPLATES . '/faces/image.inc';
     $response = new stdClass();
     $response->response = Horde::endBuffer();
     return new Horde_Core_Ajax_Response($response);
 }
开发者ID:horde,项目名称:horde,代码行数:27,代码来源:EditFaces.php

示例4: getDimensions

 function getDimensions()
 {
     $tmp_file = Horde_Util::getTempFile('fax', true, '/tmp');
     Horde::startBuffer();
     var_dump($tmp_file);
     Horde::log('Created temp file:' . Horde::endBuffer() . ':', 'DEBUG');
     $fp = fopen($tmp_file, 'w');
     fwrite($fp, $this->_data);
     fclose($fp);
     /* Run a ImageMagick identify command on the file to get the details. */
     $command = sprintf('%s %s', $this->_cmd['identify'], $tmp_file);
     Horde::log('External command call by Hylax_Image::getDimensions(): :' . $command . ':', 'DEBUG');
     exec($command, $output, $retval);
     $init = strlen($tmp_file);
     /* Figure out the dimensions from the output. */
     Horde::log('External command output by Hylax_Image::getDimensions(): ' . serialize($output), 'DEBUG');
     foreach ($output as $key => $line) {
         if (substr($line, 0, $init) != $tmp_file) {
             continue;
         }
         $info = explode(' ', $line);
         $dims = explode('+', $info[2]);
         list($width, $height) = explode('x', $dims[0]);
         $this->_pages[$key]['width'] = $width;
         $this->_pages[$key]['height'] = $height;
     }
 }
开发者ID:horde,项目名称:horde,代码行数:27,代码来源:Image.php

示例5: _init

 /**
  */
 protected function _init()
 {
     global $injector, $notification;
     /* Redirect if forward is not available. */
     $this->_assertCategory(Ingo_Storage::ACTION_FORWARD, _("Forward"));
     if ($this->vars->submitbutton == _("Return to Rules List")) {
         Ingo_Basic_Filters::url()->redirect();
     }
     /* Get the forward object and rule. */
     $ingo_storage = $injector->getInstance('Ingo_Factory_Storage')->create();
     $forward = $ingo_storage->retrieve(Ingo_Storage::ACTION_FORWARD);
     $filters = $ingo_storage->retrieve(Ingo_Storage::ACTION_FILTERS);
     $fwd_id = $filters->findRuleId(Ingo_Storage::ACTION_FORWARD);
     $fwd_rule = $filters->getRule($fwd_id);
     /* Build form. */
     $form = new Ingo_Form_Forward($this->vars);
     /* Perform requested actions. Ingo_Form_Forward does token checking
      * for us. */
     if ($form->validate($this->vars)) {
         $forward->setForwardAddresses($this->vars->addresses);
         $forward->setForwardKeep($this->vars->keep_copy == 'on');
         try {
             $ingo_storage->store($forward);
             $notification->push(_("Changes saved."), 'horde.success');
             if ($this->vars->submitbutton == _("Save and Enable")) {
                 $filters->ruleEnable($fwd_id);
                 $ingo_storage->store($filters);
                 $notification->push(_("Rule Enabled"), 'horde.success');
                 $fwd_rule['disable'] = false;
             } elseif ($this->vars->submitbutton == _("Save and Disable")) {
                 $filters->ruleDisable($fwd_id);
                 $ingo_storage->store($filters);
                 $notification->push(_("Rule Disabled"), 'horde.success');
                 $fwd_rule['disable'] = true;
             }
             Ingo_Script_Util::update();
         } catch (Ingo_Exception $e) {
             $notification->push($e);
         }
     }
     /* Add buttons depending on the above actions. */
     $form->setCustomButtons($fwd_rule['disable']);
     /* Set default values. */
     if (!$form->isSubmitted()) {
         $this->vars->keep_copy = $forward->getForwardKeep();
         $this->vars->addresses = implode("\n", $forward->getForwardAddresses());
     }
     /* Set form title. */
     $form_title = _("Forward");
     if (!empty($fwd_rule['disable'])) {
         $form_title .= ' [<span class="horde-form-error">' . _("Disabled") . '</span>]';
     }
     $form_title .= ' ' . Horde_Help::link('ingo', 'forward');
     $form->setTitle($form_title);
     $this->header = _("Forwards Edit");
     Horde::startBuffer();
     $form->renderActive(new Horde_Form_Renderer(array('encode_title' => false, 'varrenderer_driver' => array('ingo', 'ingo'))), $this->vars, self::url(), 'post');
     $this->output = Horde::endBuffer();
 }
开发者ID:jubinpatel,项目名称:horde,代码行数:61,代码来源:Forward.php

示例6: _content

 /**
  */
 protected function _content()
 {
     $cloud = new Horde_Core_Ui_TagCloud();
     foreach ($this->_getTags() as $tag) {
         $cloud->addElement($tag['tag_name'], '#', $tag['count'], null, 'doSearch(\'' . $tag['tag_name'] . '\'); return false;');
     }
     Horde::startBuffer();
     include HORDE_TEMPLATES . '/block/cloud.inc';
     return Horde::endBuffer() . '<div>&nbsp;' . Horde_Themes_Image::tag('loading.gif', array('attr' => array('id' => 'cloudloadingimg', 'style' => 'display:none;'))) . '</div>' . $cloud->buildHTML() . '<div id="cloudsearch"></div>';
 }
开发者ID:DSNS-LAB,项目名称:Dmail,代码行数:12,代码来源:Cloud.php

示例7: _render

 /**
  * Return the full rendered version of the Horde_Mime_Part object.
  *
  * @return array  See parent::render().
  */
 protected function _render()
 {
     $data = $this->_impRender(false);
     $item = reset($data);
     Horde::startBuffer();
     $GLOBALS['page_output']->includeStylesheetFiles();
     $item['data'] = '<html><head>' . Horde::endBuffer() . '</head><body>' . $item['data'] . '</body></html>';
     $data[key($data)] = $item;
     return $data;
 }
开发者ID:DSNS-LAB,项目名称:Dmail,代码行数:15,代码来源:Plain.php

示例8: _content

 /**
  */
 protected function _content()
 {
     global $page_output, $registry;
     $abooks = empty($this->_params['addressbooks']) ? array_keys($this->_options) : $this->_params['addressbooks'];
     $page_output->addInlineJsVars(array('TurbaMinisearch.abooks' => $abooks, 'TurbaMinisearch.URI_AJAX' => $registry->getServiceLink('ajax', 'turba')->url));
     $page_output->addScriptFile('minisearch.js');
     Horde::startBuffer();
     include TURBA_TEMPLATES . '/block/minisearch.inc';
     return Horde::endBuffer();
 }
开发者ID:jubinpatel,项目名称:horde,代码行数:12,代码来源:Minisearch.php

示例9: html

 /**
  * Return the HTML representing this view.
  *
  * @return string  The HTML.
  */
 public function html()
 {
     $view = $this->_getHordeView();
     if (!empty($this->view->api)) {
         Horde::startBuffer();
         $prototypejs = new Horde_Script_File_JsDir('prototype.js', 'horde');
         echo $prototypejs->tag_full;
         $html = Horde::endBuffer();
         return $html . $view->render('gallery');
     }
     return $view->render('gallery');
 }
开发者ID:jubinpatel,项目名称:horde,代码行数:17,代码来源:Gallery.php

示例10: appTests

 /**
  */
 public function appTests()
 {
     $ret = '<h1>Mail Server Support Test</h1>';
     $vars = Horde_Variables::getDefaultVariables();
     if ($vars->user && $vars->passwd) {
         $ret .= $this->_doConnectionTest($vars);
     }
     $self_url = Horde::selfUrl()->add('app', 'imp');
     Horde::startBuffer();
     require IMP_TEMPLATES . '/test/mailserver.inc';
     return $ret . Horde::endBuffer();
 }
开发者ID:horde,项目名称:horde,代码行数:14,代码来源:Test.php

示例11: appTests

 /**
  * Any application specific tests that need to be done.
  *
  * @return string  HTML output.
  */
 public function appTests()
 {
     $ret = '<h1>LDAP Support Test</h1>';
     $params = array('server' => Horde_Util::getPost('server'), 'port' => Horde_Util::getPost('port', 389), 'basedn' => Horde_Util::getPost('basedn'), 'user' => Horde_Util::getPost('user'), 'passwd' => Horde_Util::getPost('passwd'), 'filter' => Horde_Util::getPost('filter'), 'proto' => Horde_Util::getPost('proto'));
     if (!empty($params['server']) && !empty($params['basedn']) && !empty($params['filter'])) {
         $ret .= $this->_doConnectionTest($params);
     }
     $self_url = Horde::selfUrl()->add('app', 'turba');
     Horde::startBuffer();
     require TURBA_TEMPLATES . '/test/ldapserver.inc';
     return $ret . Horde::endBuffer();
 }
开发者ID:DSNS-LAB,项目名称:Dmail,代码行数:17,代码来源:Test.php

示例12: _content

 /**
  */
 protected function _content()
 {
     $qManager = new Whups_Query_Manager();
     $queries = $qManager->listQueries($GLOBALS['registry']->getAuth(), true);
     $myqueries = new Whups_View_SavedQueries(array('results' => $queries));
     Horde::startBuffer();
     $myqueries->html(false);
     $html = Horde::endBuffer();
     if ($html) {
         return $html;
     }
     return '<p class="horde-content"><em>' . _("No queries have been saved.") . '</em></p>';
 }
开发者ID:jubinpatel,项目名称:horde,代码行数:15,代码来源:Myqueries.php

示例13: _render

 /**
  * Return the full rendered version of the Horde_Mime_Part object.
  *
  * @return array  See parent::render().
  */
 protected function _render()
 {
     $ret = $this->_renderInline();
     if (!empty($ret)) {
         reset($ret);
         $GLOBALS['page_output']->topbar = $GLOBALS['page_output']->sidebar = false;
         Horde::startBuffer();
         $GLOBALS['page_output']->header(array('html_id' => 'htmlAllowScroll'));
         echo $ret[key($ret)]['data'];
         $GLOBALS['page_output']->footer();
         $ret[key($ret)]['data'] = Horde::endBuffer();
     }
     return $ret;
 }
开发者ID:DSNS-LAB,项目名称:Dmail,代码行数:19,代码来源:Itip.php

示例14: getPage

 function getPage()
 {
     $this->_pageParams['registry']->pushApp('turba', array('check_perms' => false));
     $this->fakeAuth();
     $page = new Turba_BrowsePage($this->_pageParams);
     Horde::startBuffer();
     $page->run();
     $this->_output = Horde::endBuffer();
     if ($push_result) {
         $this->_pageParams['registry']->popApp();
     }
     $this->assertNoUnwantedPattern('/<b>Warning/', $this->_output);
     $this->assertNoUnwantedPattern('/<b>Fatal error/i', $this->_output);
     return $this->_output;
 }
开发者ID:jubinpatel,项目名称:horde,代码行数:15,代码来源:BrowsePageTest.php

示例15: chunkContent

 /**
  * Loads a chunk of PHP code (usually an HTML template) from the
  * application's templates directory.
  *
  * @return object  Object with the following properties:
  *   - chunk: (string) A chunk of PHP output.
  */
 public function chunkContent()
 {
     $chunk = basename($this->vars->chunk);
     $result = new stdClass();
     if (!empty($chunk)) {
         Horde::startBuffer();
         try {
             include $GLOBALS['registry']->get('templates', $this->_base->app) . '/chunks/' . $chunk . '.php';
             $result->chunk = Horde::endBuffer();
         } catch (Exception $e) {
             Horde::endBuffer();
             throw $e;
         }
     }
     return $result;
 }
开发者ID:jubinpatel,项目名称:horde,代码行数:23,代码来源:Chunk.php


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