当前位置: 首页>>代码示例>>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;未经允许,请勿转载。