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


PHP Form::getUri方法代碼示例

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


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

示例1: makeRequestUsingForm

 protected function makeRequestUsingForm(Form $form)
 {
     $files = [];
     $plainFiles = $form->getFiles();
     foreach ($plainFiles as $key => $file) {
         $files[$key] = new UploadedFile($file['tmp_name'], $file['name'], $file['type'], $file['size'], $file['error'], true);
     }
     return $this->makeRequest($form->getMethod(), $form->getUri(), $form->getValues(), [], $files);
 }
開發者ID:woolensculpture,項目名稱:pulse,代碼行數:9,代碼來源:IntegrationTestCase.php

示例2: testGetBaseUri

 public function testGetBaseUri()
 {
     $dom = new \DOMDocument();
     $dom->loadHTML('<form method="post" action="foo.php"><input type="text" name="bar" value="bar" /><input type="submit" /></form>');
     $nodes = $dom->getElementsByTagName('input');
     $form = new Form($nodes->item($nodes->length - 1), 'http://www.foo.com/');
     $this->assertEquals('http://www.foo.com/foo.php', $form->getUri());
 }
開發者ID:ngitimfoyo,項目名稱:Nyari-AppPHP,代碼行數:8,代碼來源:FormTest.php

示例3: submit

    /**
     * Submits a form.
     *
     * @param Form  $form   A Form instance
     * @param array $values An array of form field values
     *
     * @api
     */
    public function submit(Form $form, array $values = array())
    {
        $form->setValues($values);

        return $this->request($form->getMethod(), $form->getUri(), $form->getPhpValues(), $form->getPhpFiles());
    }
開發者ID:pmjones,項目名稱:php-framework-benchmarks,代碼行數:14,代碼來源:Client.php

示例4: makeRequestUsingForm

 /**
  * Make a request to the application using the given form.
  *
  * @param  \Symfony\Component\DomCrawler\Form  $form
  * @return $this
  */
 protected function makeRequestUsingForm(Form $form)
 {
     return $this->makeRequest($form->getMethod(), $form->getUri(), $this->extractParametersFromForm($form), [], $form->getFiles());
 }
開發者ID:Calky,項目名稱:uas,代碼行數:10,代碼來源:CrawlerTrait.php

示例5: makeRequestUsingForm

 /**
  * Make a request to a URL using form parameters.
  *
  * @param  Form $form
  * @return static
  */
 protected function makeRequestUsingForm(Form $form)
 {
     return $this->makeRequest($form->getMethod(), $form->getUri(), $form->getValues(), [], $form->getFiles());
 }
開發者ID:sabahtalateh,項目名稱:laracast,代碼行數:10,代碼來源:LaravelTestCase.php

示例6: submit

 /**
  * Submit a form
  *
  * @param \Symfony\Component\DomCrawler\Form $form
  * @return \TYPO3\Flow\Http\Response
  * @api
  */
 public function submit(Form $form)
 {
     return $this->request($form->getUri(), $form->getMethod(), $form->getPhpValues(), $form->getPhpFiles());
 }
開發者ID:robertlemke,項目名稱:flow-development-collection,代碼行數:11,代碼來源:Browser.php

示例7: submitForm

 /**
  * 
  * @param \Symfony\Component\DomCrawler\Form $form
  * @param string    $method     The Request Method
  */
 public function submitForm(Form $form, $method = "POST")
 {
     $this->getClient()->request($method, $form->getUri(), $form->getPhpValues());
 }
開發者ID:doyolabs,項目名稱:symfony-test,代碼行數:9,代碼來源:WebTestCase.php

示例8: getSonataAdminFormName

 public function getSonataAdminFormName(Form $form)
 {
     parse_str(parse_url($form->getUri(), PHP_URL_QUERY), $query);
     return $query['uniqid'];
 }
開發者ID:ruslan-polutsygan,項目名稱:dev-bundle,代碼行數:5,代碼來源:SonataAdminExtensionTrait.php

示例9: disableModuleAsync

 /**
  * @param Form    $form
  * @param string  $package
  * @param string  $slug
  * @param Session $session
  *
  * @return Promise
  *
  * @rejects RequestException
  */
 public function disableModuleAsync(Form $form, $package, $slug, Session $session)
 {
     $formData = $form->getPhpValues();
     if (empty($formData['modules'][$package][$slug]['enable'])) {
         // The module is already disabled.
         return new FulfilledPromise(null);
     }
     unset($formData['modules'][$package][$slug]['enable']);
     return $this->client->requestAsync($form->getMethod(), $form->getUri(), [RequestOptions::COOKIES => $session->getCookieJar(), RequestOptions::AUTH => $session->getAuthData(), RequestOptions::FORM_PARAMS => $formData, RequestOptions::HEADERS => ['referer' => $form->getUri()], RequestOptions::ALLOW_REDIRECTS => false])->then(function () {
         // Resolve to null.
     });
 }
開發者ID:Briareos,項目名稱:Undine,代碼行數:22,代碼來源:Client.php


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