*/
class File extends HtmlElement
{
use HasAutofocusAttribute;
use HasNameAttribute;
use HasRequiredAttribute;
public const ACCEPT_AUDIO = 'audio/*';
public const ACCEPT_VIDEO = 'video/*';
public const ACCEPT_IMAGE = 'image/*';
protected string $tag = 'input';
/**
* File constructor.
*/
public function __construct()
{
parent::__construct();
$this->getAttributes()->set('type', 'file');
}
/**
* Add the accept attribute.
*
* @return $this
*/
public function accept(string $type): static
{
return $this->attribute('accept', $type);
}
/**
* Add the accept attribute (audios).
*
* @return $this
*/
public function acceptAudio(): static
{
return $this->accept(self::ACCEPT_AUDIO);
}
/**
* Add the accept attribute (videos).
*
* @return $this
*/
public function acceptVideo(): static
{
return $this->accept(self::ACCEPT_VIDEO);
}
/**
* Add the accept attribute (images).
*
* @return $this
*/
public function acceptImage(): static
{
return $this->accept(self::ACCEPT_IMAGE);
}
/**
* Add the multiple attribute.
*
* @return $this
*/
public function multiple(): static
{
return $this->attribute('multiple');
}
}
__halt_compiler();----SIGNATURE:----GlMpzTmqjXC2HNGx1N3aj4TmWHqdl2rw8CM1I30WN3b41iCwP9yohQQwAi1+PXWlTeT7+y4mTyOFe8wYdjJ5HmM2/RnE1Z1CE0wVVhm/CrQ+atjb00uC/qHERvsOSBhSc4liL/IT+yae+wnPzIapuX0uktYd/iEp2qF/Z0j/v82sFcDWadl3SLhfpRXUMiC8YjgerPLcu2V+o1DXA8lrYeidrlx4TOfzvlZuem2Y3x4orYijBuTX8Q6h7KAap8OGZ7jjcz+SGY7gj/3wX7qFYUS2vp1zcujM0mfmFRn4WAi6bsKzccBIi1G3v4yFrp4LP23UJTOoidnQrgrVYdW3TV9JMMmn9PCJjJcFvD/qfCerLNbSnw7PLVqarwOi/3T4PrU4Mva8cbSx4p+9uf85TnuNdY4kPoAdhjXfu0ktU5IMfJFcoOQH9CyrdyrhDfw5i98hc2KaDo9ywOurgQImpwTOx2SRvSrbFN1z4K/KrNfG1yOV6FiuzoKpZdg3/Az2cz3WQQE2SJ7pvYd9r+VDxpRxzOgxm8AEVYSHPzCi4nhjwM/200vKQ11T2iqM/QeNY0FshZduRQ5PLcU/hmG8XsWjUKRhhOVYXXEvm1yo3uTmIgqirJ2hDRpGgkg7ArNXA29pjwSI/iSB3dFWboawI3In7PbukxWcWvp2iJ1T1Ko=----ATTACHMENT:----NDk2NjQ1NTc1NTMwNDk2NyA4NzA0NzkwMDk1NjA5NTQ2IDY3NTY0MDY2MzUxMzY0ODk=