Pop\Form\Form::hasFile PHP Метод

hasFile() публичный Метод

Get the $hasFile property
public hasFile ( ) : boolean
Результат boolean
    public function hasFile()
    {
        return $this->hasFile;
    }

Usage Example

Пример #1
0
 public function testSetArrayOfFields()
 {
     $fields = array(array('username' => array('type' => 'text', 'value' => 'Username here...', 'label' => 'Username:'******'required' => true, 'attributes' => array('size' => 40)), 'upload' => array('type' => 'file', 'label' => 'File:', 'required' => true, 'attributes' => array('size' => 40))), array('email1' => array('type' => 'text', 'label' => 'Email 1:', 'required' => true, 'attributes' => array('size' => 40)), 'email2' => array('type' => 'text', 'label' => 'Email 1:', 'required' => true, 'attributes' => array('size' => 40))));
     $f = new Form('/submit', 'post', $fields);
     $this->assertEquals(4, count($f->getFields()));
     $this->assertTrue($f->hasFile());
 }