Overview

Namespaces

  • DSchoenbauer
    • Orm
      • Builder
      • Entity
      • Enum
      • Events
        • Persistence
        • Validate
          • DataType
          • Schema
      • Exception
      • Framework

Classes

  • Attribute
  • AttributeCollection
  • Overview
  • Namespace
  • Class

Class AttributeCollection

A collection of attributes that define a given object

Namespace: DSchoenbauer\Orm\Framework
Author: David Schoenbauer dschoenbauer@gmail.com
Located at Orm/Framework/AttributeCollection.php
Methods summary
public
# set( string $key, mixed $value )

sets a parameter into the collection

sets a parameter into the collection

Parameters

$key
a key used to retrieve or identify a given value
$value
a value to be stored

Returns


$this
public mixed
# get( string $key, mixed $defaultValue = null, string $type = DSchoenbauer\Orm\Framework\AttributeCollection::BY_VALUE )

Retrieves a parameter if the parameter doesn't exist one is created with the default value

Retrieves a parameter if the parameter doesn't exist one is created with the default value

Parameters

$key
a one word label for the value
$defaultValue
a value to use if the parameter is not present
$type

byRef or byValue : byRef will return the attribute object and byValue will return the attribute value

Returns

mixed
type will define what is returned

Since

v1.0.0
public boolean
# has( string $key )

Validates the existence of a previously set parameter

Validates the existence of a previously set parameter

Parameters

$key

Returns

boolean

Since

v1.0.0
Constants summary
string BY_VALUE

returns the value that is housed inside an attribute

returns the value that is housed inside an attribute

# "byValue"
string BY_REF

gets the attribute object itself allowing for late binding to a value

gets the attribute object itself allowing for late binding to a value

# "byRef"
API documentation generated by ApiGen