mirror of
https://github.com/appwrite/appwrite
synced 2026-05-06 06:48:22 +00:00
43 lines
815 B
PHP
43 lines
815 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace Appwrite\Utopia\Response\Model;
|
||
|
|
|
||
|
|
use Appwrite\Utopia\Response;
|
||
|
|
use Appwrite\Utopia\Response\Model\AttributeString;
|
||
|
|
|
||
|
|
class URL extends AttributeString
|
||
|
|
{
|
||
|
|
public function __construct()
|
||
|
|
{
|
||
|
|
$this
|
||
|
|
->addRule('format', [
|
||
|
|
'type' => self::TYPE_STRING,
|
||
|
|
'description' => 'String format.',
|
||
|
|
'default' => 'url',
|
||
|
|
'example' => 'url',
|
||
|
|
'array' => false,
|
||
|
|
'required' => true,
|
||
|
|
])
|
||
|
|
;
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Get Name
|
||
|
|
*
|
||
|
|
* @return string
|
||
|
|
*/
|
||
|
|
public function getName():string
|
||
|
|
{
|
||
|
|
return 'URL';
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Get Collection
|
||
|
|
*
|
||
|
|
* @return string
|
||
|
|
*/
|
||
|
|
public function getType():string
|
||
|
|
{
|
||
|
|
return Response::MODEL_URL;
|
||
|
|
}
|
||
|
|
}
|