PHP Class ApiPlatform\Core\Metadata\Property\PropertyMetadata

Author: Kévin Dunglas ([email protected])
Mostrar archivo Open project: api-platform/core Class Usage Examples

Public Methods

Method Description
__construct ( Symfony\Component\PropertyInfo\Type $type = null, string $description = null, boolean $readable = null, boolean $writable = null, boolean $readableLink = null, boolean $writableLink = null, boolean $required = null, boolean $identifier = null, string $iri = null, $childInherited = null, array $attributes = null )
getAttributes ( ) : array | null Gets attributes.
getDescription ( ) : string | null Gets description.
getIri ( ) : string | null Gets IRI of this property.
getType ( ) : Symfony\Component\PropertyInfo\Type | null Gets type.
isChildInherited ( ) : string | null Is the property inherited from a child class?
isIdentifier ( ) : boolean | null Is this attribute an identifier?
isReadable ( ) : boolean | null Is readable?
isReadableLink ( ) : boolean | null Is an IRI or an object generated in read context?
isRequired ( ) : boolean | null Is required?
isWritable ( ) : boolean | null Is writable?
isWritableLink ( ) : boolean | null Should an IRI or an object be provided in write context?
withAttributes ( array $attributes ) : self Returns a new instance with the given attribute.
withChildInherited ( string $childInherited ) : self Returns a new instance with the given child inherited class.
withDescription ( string $description ) : self Returns a new instance with the given description.
withIdentifier ( boolean $identifier ) : self Returns a new instance with the given identifier flag.
withIri ( string $iri = null ) : self Returns a new instance with the given IRI.
withReadable ( boolean $readable ) : self Returns a new instance of Metadata with the given readable flag.
withReadableLink ( boolean $readableLink ) : self Returns a new instance with the given readable link flag.
withRequired ( boolean $required ) : self Returns a new instance with the given required flag.
withType ( Symfony\Component\PropertyInfo\Type $type ) : self Returns a new instance with the given type.
withWritable ( boolean $writable ) : self Returns a new instance with the given writable flag.
withWritableLink ( boolean $writableLink ) : self Returns a new instance with the given writable link flag.

Method Details

__construct() public method

public __construct ( Symfony\Component\PropertyInfo\Type $type = null, string $description = null, boolean $readable = null, boolean $writable = null, boolean $readableLink = null, boolean $writableLink = null, boolean $required = null, boolean $identifier = null, string $iri = null, $childInherited = null, array $attributes = null )
$type Symfony\Component\PropertyInfo\Type
$description string
$readable boolean
$writable boolean
$readableLink boolean
$writableLink boolean
$required boolean
$identifier boolean
$iri string
$attributes array

getAttributes() public method

Gets attributes.
public getAttributes ( ) : array | null
return array | null

getDescription() public method

Gets description.
public getDescription ( ) : string | null
return string | null

getIri() public method

Gets IRI of this property.
public getIri ( ) : string | null
return string | null

getType() public method

Gets type.
public getType ( ) : Symfony\Component\PropertyInfo\Type | null
return Symfony\Component\PropertyInfo\Type | null

isChildInherited() public method

Is the property inherited from a child class?
public isChildInherited ( ) : string | null
return string | null

isIdentifier() public method

Is this attribute an identifier?
public isIdentifier ( ) : boolean | null
return boolean | null

isReadable() public method

Is readable?
public isReadable ( ) : boolean | null
return boolean | null

isRequired() public method

Is required?
public isRequired ( ) : boolean | null
return boolean | null

isWritable() public method

Is writable?
public isWritable ( ) : boolean | null
return boolean | null

withAttributes() public method

Returns a new instance with the given attribute.
public withAttributes ( array $attributes ) : self
$attributes array
return self

withChildInherited() public method

Returns a new instance with the given child inherited class.
public withChildInherited ( string $childInherited ) : self
$childInherited string
return self

withDescription() public method

Returns a new instance with the given description.
public withDescription ( string $description ) : self
$description string
return self

withIdentifier() public method

Returns a new instance with the given identifier flag.
public withIdentifier ( boolean $identifier ) : self
$identifier boolean
return self

withIri() public method

Returns a new instance with the given IRI.
public withIri ( string $iri = null ) : self
$iri string
return self

withReadable() public method

Returns a new instance of Metadata with the given readable flag.
public withReadable ( boolean $readable ) : self
$readable boolean
return self

withRequired() public method

Returns a new instance with the given required flag.
public withRequired ( boolean $required ) : self
$required boolean
return self

withType() public method

Returns a new instance with the given type.
public withType ( Symfony\Component\PropertyInfo\Type $type ) : self
$type Symfony\Component\PropertyInfo\Type
return self

withWritable() public method

Returns a new instance with the given writable flag.
public withWritable ( boolean $writable ) : self
$writable boolean
return self