mirror of
https://github.com/Chouchen/ShikiryuRSS.git
synced 2025-09-10 02:24:33 +02:00
@@ -10,32 +10,41 @@ use Shikiryu\SRSS\Validator\Validator;
|
||||
class Image extends HasValidator implements SRSSElement
|
||||
{
|
||||
/**
|
||||
* @required
|
||||
* @url
|
||||
* @validate required
|
||||
* @validate url
|
||||
* @format url
|
||||
*/
|
||||
public ?string $url = null;
|
||||
protected ?string $url = null;
|
||||
/**
|
||||
* @required
|
||||
* @nohtml
|
||||
* @validate required
|
||||
* @validate nohtml
|
||||
* @format nohtml
|
||||
*/
|
||||
public ?string $title = null;
|
||||
protected ?string $title = null;
|
||||
/**
|
||||
* @required
|
||||
* @url
|
||||
* @validate required
|
||||
* @validate url
|
||||
* @format url
|
||||
*/
|
||||
public ?string $link = null;
|
||||
protected ?string $link = null;
|
||||
/**
|
||||
* @int
|
||||
* @max 144
|
||||
* @validate int
|
||||
* @format int
|
||||
* @validate max 144
|
||||
*/
|
||||
public int $width = 88; // Maximum value for width is 144, default value is 88.
|
||||
protected int $width = 88; // Maximum value for width is 144, default value is 88.
|
||||
/**
|
||||
* @int
|
||||
* @max 400
|
||||
* @format int
|
||||
* @validate int
|
||||
* @validate max 400
|
||||
*/
|
||||
public int $height = 31; //Maximum value for height is 400, default value is 31.
|
||||
protected int $height = 31; //Maximum value for height is 400, default value is 31.
|
||||
|
||||
public string $description;
|
||||
/**
|
||||
* @var string
|
||||
* @format html
|
||||
*/
|
||||
protected string $description;
|
||||
|
||||
public function isValid(): bool
|
||||
{
|
||||
|
Reference in New Issue
Block a user