Documentation

Recipe
in package

Table of Contents

Properties

$content  : string
$description  : string
$id  : string
$name  : string
$previewImage  : string
$sampleData  : mixed
$source  : string
$tag  : string

Methods

__construct()  : mixed
set()  : mixed
validate schema and set values
validateSchema()  : mixed
validate all recipe fields except id

Properties

$description

public string $description

$previewImage

public string $previewImage

$sampleData

public static mixed $sampleData = ["name" => "Sample recipe", "description" => "This is sample recipe", "previewImage" => "https://placehold.co/600x400", "source" => "https://google.com", "tag" => "none", "content" => "<h2>Ingredients</h2><p>None</p><h2>Instructions</h2><p>None</p>"]

Methods

__construct()

public __construct([bool|array<string|int, mixed> $data = false ][, mixed $setId = false ]) : mixed
Parameters
$data : bool|array<string|int, mixed> = false
$setId : mixed = false

set()

validate schema and set values

public set(array<string|int, mixed> $data) : mixed
Parameters
$data : array<string|int, mixed>

validateSchema()

validate all recipe fields except id

public static validateSchema(array<string|int, mixed> $schema) : mixed
Parameters
$schema : array<string|int, mixed>

        
On this page

Search results