本文整理匯總了PHP中Zend_Form::getMethod方法的典型用法代碼示例。如果您正苦於以下問題:PHP Zend_Form::getMethod方法的具體用法?PHP Zend_Form::getMethod怎麽用?PHP Zend_Form::getMethod使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Zend_Form
的用法示例。
在下文中一共展示了Zend_Form::getMethod方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: checkMarkup
public function checkMarkup($html)
{
$this->assertFalse(empty($html));
$this->assertContains('<form', $html);
$this->assertRegexp('/<form[^>]+action="' . $this->form->getAction() . '"/', $html);
$this->assertRegexp('/<form[^>]+method="' . $this->form->getMethod() . '"/i', $html);
$this->assertRegexp('#<form[^>]+enctype="application/x-www-form-urlencoded"#', $html);
$this->assertContains('</form>', $html);
}
示例2: testCanSetObjectStateByPassingConfigObjectToConstructor
public function testCanSetObjectStateByPassingConfigObjectToConstructor()
{
$config = new Zend_Config($this->getOptions());
$form = new Zend_Form($config);
$this->assertEquals('foo', $form->getName());
$this->assertEquals('someform', $form->getAttrib('class'));
$this->assertEquals('/foo/bar', $form->getAction());
$this->assertEquals('put', $form->getMethod());
}
示例3: getFormAsArray
/**
* Return an array of form elements.
*
* @param Zend_Form $form
* @return array
*/
public function getFormAsArray(Zend_Form $form)
{
$array = array();
$array['action'] = $form->getAction();
$array['method'] = $form->getMethod();
foreach ($form->getElements() as $element) {
$element->removeDecorator('HtmlTag');
$element->removeDecorator('Label');
$element->removeDecorator('DtDdWrapper');
$array[$element->getName()] = $element;
}
return $array;
}