php-dt-modern.model_container.mustache Maven / Gradle / Ivy
{{#vars
}}{{#isArray
}}{{#isPrimitiveType
}}#[DTA\Strategy("ScalarList", ["type" => {{>list_item_type}}])]
{{/isPrimitiveType
}}{{#items.isDate
}}#[DTA\Strategy("DateList")]
{{/items.isDate
}}{{#items.isDateTime
}}#[DTA\Strategy("DateTimeList")]
{{/items.isDateTime
}}{{^isPrimitiveType}}{{^items.isDate}}{{^items.isDateTime
}}#[DTA\Strategy("ObjectList", ["type" => {{>list_item_type}}])]
{{/items.isDateTime}}{{/items.isDate}}{{/isPrimitiveType
}}{{#minItems}}{{^maxItems
}}#[DTA\Validator("Count", ["min" => {{minItems}}], blocker: true)]
{{/maxItems}}{{/minItems
}}{{^minItems}}{{#maxItems
}}#[DTA\Validator("Count", ["max" => {{maxItems}}], blocker: true)]
{{/maxItems}}{{/minItems
}}{{#minItems}}{{#maxItems
}}#[DTA\Validator("Count", ["min" => {{minItems}}, "max" => {{maxItems}}], blocker: true)]
{{/maxItems}}{{/minItems
}}#[DTA\Validator("Collection", ["validators" => [
{{#isPrimitiveType
}} ["name" => "Scalar", "options" => ["type" => {{>list_item_type}}]]
{{/isPrimitiveType
}}{{#items.isDate
}} ["name" => "Date"]
{{/items.isDate
}}{{#items.isDateTime
}} ["name" => "DateTime"]
{{/items.isDateTime
}}{{^isPrimitiveType}}{{^items.isDate}}{{^items.isDateTime
}} ["name" => "TypeCompliant", "options" => ["type" => {{>list_item_type}}]]
{{/items.isDateTime}}{{/items.isDate}}{{/isPrimitiveType
}}]])]
{{/isArray
}}{{#isMap
}}{{#isPrimitiveType
}}#[DTA\Strategy("ScalarMap", ["type" => {{>map_item_type}}])]
{{/isPrimitiveType
}}{{#additionalProperties.isDate
}}#[DTA\Strategy("DateMap")]
{{/additionalProperties.isDate
}}{{#additionalProperties.isDateTime
}}#[DTA\Strategy("DateTimeMap")]
{{/additionalProperties.isDateTime
}}{{^isPrimitiveType}}{{^additionalProperties.isDate}}{{^additionalProperties.isDateTime
}}#[DTA\Strategy("ObjectMap", ["type" => {{>map_item_type}}])]
{{/additionalProperties.isDateTime}}{{/additionalProperties.isDate}}{{/isPrimitiveType
}}{{#minProperties}}{{^maxProperties
}}#[DTA\Validator("Count", ["min" => {{minProperties}}], blocker: true)]
{{/maxProperties}}{{/minProperties
}}{{^minProperties}}{{#maxProperties
}}#[DTA\Validator("Count", ["max" => {{maxProperties}}], blocker: true)]
{{/maxProperties}}{{/minProperties
}}{{#minProperties}}{{#maxProperties
}}#[DTA\Validator("Count", ["min" => {{minProperties}}, "max" => {{maxProperties}}], blocker: true)]
{{/maxProperties}}{{/minProperties
}}#[DTA\Validator("Collection", ["validators" => [
{{#isPrimitiveType
}} ["name" => "Scalar", "options" => ["type" => {{>map_item_type}}]]
{{/isPrimitiveType
}}{{#additionalProperties.isDate
}} ["name" => "Date"]
{{/additionalProperties.isDate
}}{{#additionalProperties.isDateTime
}} ["name" => "DateTime"]
{{/additionalProperties.isDateTime
}}{{^isPrimitiveType}}{{^additionalProperties.isDate}}{{^additionalProperties.isDateTime
}} ["name" => "TypeCompliant", "options" => ["type" => {{>map_item_type}}]]
{{/additionalProperties.isDateTime}}{{/additionalProperties.isDate}}{{/isPrimitiveType
}}]])]
{{/isMap
}}{{/vars
}}class {{classname}} extends \ArrayObject
{
}