appwrite/src/Appwrite/Utopia/Response/Model/Email.php

43 lines
825 B
PHP
Raw Normal View History

<?php
namespace Appwrite\Utopia\Response\Model;
use Appwrite\Utopia\Response;
use Appwrite\Utopia\Response\Model\AttributeString;
class Email extends AttributeString
{
public function __construct()
{
$this
->addRule('format', [
'type' => self::TYPE_STRING,
'description' => 'String format.',
'default' => 'email',
'example' => 'email',
'array' => false,
'required' => true,
])
;
}
/**
* Get Name
*
* @return string
*/
public function getName():string
{
return 'Email';
}
/**
* Get Collection
*
* @return string
*/
public function getType():string
{
return Response::MODEL_EMAIL;
}
}