當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Horde_Url::copy方法代碼示例

本文整理匯總了PHP中Horde_Url::copy方法的典型用法代碼示例。如果您正苦於以下問題:PHP Horde_Url::copy方法的具體用法?PHP Horde_Url::copy怎麽用?PHP Horde_Url::copy使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Horde_Url的用法示例。


在下文中一共展示了Horde_Url::copy方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: addTab

 /**
  * Adds a tab to the interface.
  *
  * @param string $title    The text which appears on the tab.
  * @param Horde_Url $link  The target page.
  * @param mixed $params    Either a string value to set the tab variable to,
  *                         or a hash of parameters. If an array, the tab
  *                         variable can be set by the 'tabname' key.
  */
 public function addTab($title, $link, $params = array())
 {
     if (!is_array($params)) {
         $params = array('tabname' => $params);
     }
     $this->_tabs[] = array_merge(array('title' => $title, 'link' => $link->copy(), 'tabname' => null, 'img' => null, 'class' => null), $params);
 }
開發者ID:jubinpatel,項目名稱:horde,代碼行數:16,代碼來源:Tabs.php

示例2: toString

 /**
  * Creates the full URL string.
  *
  * @param boolean $raw   Whether to output the URL in the raw URL format
  *                       or HTML-encoded.
  * @param boolean $full  Output the full URL?
  *
  * @return string  The string representation of this object.
  */
 public function toString($raw = false, $full = true)
 {
     if ($this->toStringCallback || !strlen($this->anchor)) {
         $baseUrl = $this->_baseUrl->copy();
         $baseUrl->parameters = array_merge($baseUrl->parameters, $this->parameters);
         if (strlen($this->pathInfo)) {
             $baseUrl->pathInfo = $this->pathInfo;
         }
         return $baseUrl->toString($raw, $full);
     }
     $url = $this->_baseUrl->toString($raw, $full);
     if (strlen($this->pathInfo)) {
         $url = rtrim($url, '/');
         $url .= '/' . $this->pathInfo;
     }
     if ($this->anchor) {
         $url .= '#' . ($raw ? $this->anchor : rawurlencode($this->anchor));
     }
     if ($params = $this->_getParameters()) {
         $url .= '?' . implode($raw ? '&' : '&', $params);
     }
     return strval($url);
 }
開發者ID:raz0rsdge,項目名稱:horde,代碼行數:32,代碼來源:Url.php

示例3: array

$allTests = array('testInitialState' => 'Test initial state. Solid blue square', 'testDefaultImageFormatDuringLoad' => 'Should load as default image type of PNG even though source file is JPG', 'testForceImageFormatDuringLoad' => 'Forces image format to JPG during loadFile (Default is PNG)', 'testChangeImageFormatAfterLoad' => 'Changes image format after loaded from file (Should be JPG)', 'testPrimitivesTransparentBG' => 'Transparent background, various primitives. Cirlce should be above the rectangles.', 'testTransparentBGWithBorder' => 'Test transparent background with border preserving transparency.', 'testTransparentPrimitivesReversed' => 'Test ordering of primitives. This should show the circle *below* the rectangles.', 'testAnnotateImage' => 'Annotate Image with Hello World in center left', 'testPolylineCircleLineText' => 'various other primitives, as well as state of stroke color, width etc...', 'testRoundCorners' => 'Rounded corners with transparent background.', 'testRoundCornersRedBG' => 'Rounded corners with red background.', 'testRoundCornersDropShadowTransparentBG' => 'Rounded corners with a drop shadow on a transparent background.', 'testRoundCornersDropShadowYellowBG' => 'Rounded corners, with a drop shadow on a yellow background', 'testBorderedDropShadowTransparentBG' => 'Thumbnail with border and drop shadow over a transparent background.', 'testBorderedDropShadowTransparentLoadString' => 'Same as above, but using loadString after the image has been instantiated.', 'testBorderedDropShadowBlueBG' => 'Thumbnail with border, drop shadow over a blue background.', 'testPolaroidTransparentBG' => 'Polaroid effect with transparent background.', 'testPolaroidBlueBG' => 'Polaroid effect with blue background.', 'testPlainstackTransparentBG' => 'Thumbnail stack on transparent background.', 'testPlainstackBlueBG' => 'Thumbnail stack on a blue background.', 'testRoundstackTransparentBG' => 'Thumbnail stack with rounded borders on a transparent background', 'testRoundstackBlueBG' => 'Thumbnail stack, rounded corners on a blue background', 'testPolaroidstackTransparentBG' => 'Polaroid stack on a transparent background.', 'testPolaroidstackBlueBG' => 'Polaroid stack on a blue background', 'testInitialStateAfterLoad' => 'Initial state after loading an existing image.', 'testResize' => 'Test resize method.', 'multipage' => 'Test Multipage tiffs', 'liquid' => 'Test Seam Carving', 'smart' => 'Test Smart Crop (Center of Edginess)', 'crop' => 'Basic Crop Test');
?>
<html>
 <head>
  <title>Horde_Image Tests</title>
  <style type="text/css">
  img {
      max-width: 600px;
  }
  </style>
 </head>
 <body style="background-color:gray">
<table>
 <thead><td>Effect</td><td>Im</td><td>Imagick</td><td>Gd</td><td>Svg</td></thead>
<?php 
$url = new Horde_Url('im.php');
foreach ($allTests as $name => $description) {
    echo '<tr><td text-align="top">' . $description . '</td><td>';
    echo '<img src="' . $url->copy()->add('test', $name) . '" />';
    echo '</td><td text-align="top">';
    echo '<img src="' . $url->copy()->add(array('test' => $name, 'driver' => 'Imagick')) . '" />';
    echo '</td><td text-align="top">';
    echo '<img src="' . $url->copy()->add(array('test' => $name, 'driver' => 'Gd')) . '" />';
    echo '</td><td text-align="top">';
    echo '<img src="' . $url->copy()->add(array('test' => $name, 'driver' => 'Svg')) . '" />';
    echo '</td></tr>';
}
echo '</table>';
?>
</body></html>
開發者ID:raz0rsdge,項目名稱:horde,代碼行數:30,代碼來源:runtest.php

示例4: array

<?php

/**
 * Test harness for generating the test images for Horde_Image tests
 */
require_once __DIR__ . '/../lib/Application.php';
Horde_Registry::appInit('horde', array('authentication' => 'none'));
$allTests = array('testInitialState' => 'Test initial state. Solid blue square', 'testDefaultImageFormatDuringLoad' => 'Should load as default image type of PNG even though source file is JPG', 'testForceImageFormatDuringLoad' => 'Forces image format to JPG during loadFile (Default is PNG)', 'testChangeImageFormatAfterLoad' => 'Changes image format after loaded from file (Should be JPG)', 'testPrimitivesTransparentBG' => 'Transparent background, various primitives. Cirlce should be above the rectangles.', 'testTransparentBGWithBorder' => 'Test transparent background with border preserving transparency.', 'testTransparentPrimitivesReversed' => 'Test ordering of primitives. This should show the circle *below* the rectangles.', 'testAnnotateImage' => 'Annotate Image with Hello World in center left', 'testPolylineCircleLineText' => 'various other primitives, as well as state of stroke color, width etc...', 'testRoundCorners' => 'Rounded corners with transparent background.', 'testRoundCornersRedBG' => 'Rounded corners with red background.', 'testRoundCornersDropShadowTransparentBG' => 'Rounded corners with a drop shadow on a transparent background.', 'testRoundCornersDropShadowYellowBG' => 'Rounded corners, with a drop shadow on a yellow background', 'testBorderedDropShadowTransparentBG' => 'Thumbnail with border and drop shadow over a transparent background.', 'testBorderedDropShadowTransparentLoadString' => 'Same as above, but using loadString after the image has been instantiated.', 'testBorderedDropShadowBlueBG' => 'Thumbnail with border, drop shadow over a blue background.', 'testPolaroidTransparentBG' => 'Polaroid effect with transparent background.', 'testPolaroidBlueBG' => 'Polaroid effect with blue background.', 'testPlainstackTransparentBG' => 'Thumbnail stack on transparent background.', 'testPlainstackBlueBG' => 'Thumbnail stack on a blue background.', 'testRoundstackTransparentBG' => 'Thumbnail stack with rounded borders on a transparent background', 'testRoundstackBlueBG' => 'Thumbnail stack, rounded corners on a blue background', 'testPolaroidstackTransparentBG' => 'Polaroid stack on a transparent background.', 'testPolaroidstackBlueBG' => 'Polaroid stack on a blue background', 'testInitialStateAfterLoad' => 'Initial state after loading an existing image.', 'testResize' => 'Test resize method.', 'multipage' => 'Test Multipage tiffs', 'liquid' => 'Test Seam Carving', 'smart' => 'Test Smart Crop (Center of Edginess)', 'crop' => 'Basic Crop Test');
?>
<html>
 <head>
  <title>Horde_Image Tests</title>
 </head>
 <body style="background-color:gray">
<table width="50%">
 <thead><td>Effect</td><td>Im</td><td>Imagick</td></thead>
<?php 
$url = new Horde_Url('im.php');
foreach ($allTests as $name => $description) {
    echo '<tr><td text-align="top">' . $description . '</td><td><img src="' . $url->copy()->add('test', $name) . '" /></td>' . '<td text-align="top"><img src="' . $url->copy()->add(array('test' => $name, 'driver' => 'Imagick')) . '" /></td></tr>';
}
echo '</table>';
?>
</body></html>
開發者ID:jubinpatel,項目名稱:horde,代碼行數:24,代碼來源:runtest.php

示例5: _init


//.........這裏部分代碼省略.........
             $addrs = $imp_compose->recipientList($header);
             if (!empty($addrs['list'])) {
                 $imp_pgp = $injector->getInstance('IMP_Crypt_Pgp');
                 try {
                     foreach ($addrs['list'] as $val) {
                         $imp_pgp->getPublicKey(strval($val));
                     }
                 } catch (Horde_Exception $e) {
                     $notification->push(_("PGP encryption cannot be used by default as public keys cannot be found for all recipients."), 'horde.warning');
                     $encrypt_options = $default_encrypt == IMP_Crypt_Pgp::ENCRYPT ? IMP::ENCRYPT_NONE : IMP_Crypt_Pgp::SIGN;
                 }
             }
         }
     }
     /* Define some variables used in the javascript code. */
     $js_vars = array('ImpComposeBase.editor_on' => $rtemode, 'ImpCompose.auto_save' => intval($prefs->getValue('auto_save_drafts')), 'ImpCompose.cancel_url' => strval($cancel_url), 'ImpCompose.cursor_pos' => $rtemode ? null : $prefs->getValue('compose_cursor'), 'ImpCompose.discard_url' => strval($discard_url), 'ImpCompose.max_attachments' => $max_attach === true ? null : $max_attach, 'ImpCompose.popup' => intval($isPopup), 'ImpCompose.redirect' => intval($redirect), 'ImpCompose.reloaded' => intval($reload), 'ImpCompose.sm_check' => intval(!$prefs->isLocked(IMP_Mailbox::MBOX_SENT)), 'ImpCompose.spellcheck' => intval($spellcheck && $prefs->getValue('compose_spellcheck')), 'ImpCompose.text' => array('cancel' => _("Cancelling this message will permanently discard its contents.") . "\n" . _("Are you sure you want to do this?"), 'change_identity' => _("You have edited your signature. Change the identity and lose your changes?"), 'discard' => _("Doing so will discard this message permanently."), 'file' => _("File"), 'nosubject' => _("The message does not have a Subject entered.") . "\n" . _("Send message without a Subject?"), 'recipient' => _("You must specify a recipient.")));
     /* Set up the base view now. */
     $view = $injector->createInstance('Horde_View');
     $view->addHelper('FormTag');
     $view->addHelper('Horde_Core_View_Helper_Accesskey');
     $view->addHelper('Horde_Core_View_Helper_Help');
     $view->addHelper('Horde_Core_View_Helper_Image');
     $view->addHelper('Horde_Core_View_Helper_Label');
     $view->addHelper('Tag');
     $view->allow_compose = !$compose_disable;
     $view->post_action = self::url();
     $blank_url = new Horde_Url('#');
     if ($redirect) {
         /* Prepare the redirect template. */
         $view->cacheid = $composeCacheID;
         $view->title = $this->title;
         $view->token = $session->getToken();
         if ($registry->hasMethod('contacts/search')) {
             $view->abook = $blank_url->copy()->link(array('class' => 'widget', 'id' => 'redirect_abook', 'title' => _("Address Book")));
             $js_vars['ImpCompose.redirect_contacts'] = strval(IMP_Basic_Contacts::url()->add(array('to_only' => 1))->setRaw(true));
         }
         $view->input_value = $header['to'];
         $this->output = $view->render('basic/compose/redirect');
     } else {
         /* Prepare the compose template. */
         $view->file_upload = $attach_upload;
         $hidden = array('actionID' => '', 'attachmentAction' => '', 'compose_formToken' => $session->getNonce(), 'compose_requestToken' => $session->getToken(), 'composeCache' => $composeCacheID, 'composeHmac' => $imp_compose->getHmac(), 'oldrtemode' => $rtemode, 'rtemode' => $rtemode, 'user' => $registry->getAuth());
         if ($attach_upload) {
             $hidden['MAX_FILE_SIZE'] = $session->get('imp', 'file_upload');
         }
         foreach (array('page', 'start', 'popup', 'template_mode') as $val) {
             $hidden[$val] = $this->vars->{$val};
         }
         $view->hidden = $hidden;
         $view->tabindex = 1;
         $view->title = $this->title;
         if (!$this->vars->template_mode) {
             $view->send_msg = true;
             $view->save_draft = $imp_imap->access(IMP_Imap::ACCESS_DRAFTS) && !$readonly_drafts;
         }
         $view->resume = $resume;
         $view->di_locked = $prefs->isLocked('default_identity');
         if ($view->di_locked) {
             $view->fromaddr_locked = $prefs->isLocked('from_addr');
             try {
                 $view->from = $identity->getFromLine(null, $this->vars->from);
             } catch (Horde_Exception $e) {
             }
         } else {
             $select_list = $identity->getSelectList();
             $view->last_identity = $identity->getDefault();
開發者ID:DSNS-LAB,項目名稱:Dmail,代碼行數:67,代碼來源:Compose.php


注:本文中的Horde_Url::copy方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。