本文整理汇总了PHP中ezcInputForm::getInvalidProperties方法的典型用法代码示例。如果您正苦于以下问题:PHP ezcInputForm::getInvalidProperties方法的具体用法?PHP ezcInputForm::getInvalidProperties怎么用?PHP ezcInputForm::getInvalidProperties使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ezcInputForm
的用法示例。
在下文中一共展示了ezcInputForm::getInvalidProperties方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
var_dump(array('test'));
echo "Required properties:\n";
var_dump(array());
echo "Optional properties:\n";
var_dump(array('test'));
?>
</td>
<td>
<pre>
<?php
$def = array('test' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'float'));
$form = new ezcInputForm(INPUT_POST, $def);
echo "Valid properties:\n";
var_dump($form->getValidProperties());
echo "Invalid properties:\n";
var_dump($form->getInvalidProperties());
echo "Required properties:\n";
var_dump($form->getRequiredProperties());
echo "Optional properties:\n";
var_dump($form->getOptionalProperties());
?>
</td>
</tr>
</table>
</body>
</html>
<?php
} else {
?>
<form method="post" align="center">
示例2: testInvalidOptionalProperties
public function testInvalidOptionalProperties()
{
$def = array('test2' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'int'), 'test3' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'int'));
$obj = new ezcInputForm(INPUT_GET, $def);
$expectedArray = array('test2', 'test3');
self::assertEquals($expectedArray, $obj->getInvalidProperties());
self::assertEquals(array(), $obj->getValidProperties());
}