phpEZ v0.4.1

Unique extends ObjAttribute
in package

Attribute to mark a database field as UNIQUE.

Used during DDL generation to add UNIQUE constraint to the column.

Tags
subpackage

db

see
Model::ddl()
Attributes
#[Attribute]
\Attribute::TARGET_PROPERTY

Table of Contents

Methods

of()  : static|false
Extract an attribute instance from a reflected property.

Methods

of()

Extract an attribute instance from a reflected property.

public static of(ReflectionProperty $field) : static|false

Searches the property's attributes for one matching this class name and instantiates it with the attribute's arguments.

Parameters
$field : ReflectionProperty

The property to inspect for attributes.

Return values
static|false

The attribute instance if found, false otherwise.

On this page

Search results