PHP Class LazyRecord\Schema\Relationship\Relationship

Inheritance: implements IteratorAggregat\IteratorAggregate, implements ArrayAcces\ArrayAccess
显示文件 Open project: corneltek/lazyrecord

Public Properties

Property Type Description
$accessor The accessor name
$data The stashed data
$onDelete
$onUpdate
$orderBy
$usingIndex
$where The SQLBuilder Condition Syntax Object

Public Methods

Method Description
__call ( $m, $as ) Provide dynamic cascading accessors.
__construct ( $accessor, array $data = [] )
__get ( $key )
__set ( $key, $val )
__set_state ( array $data ) To support var_export.
applyFilter ( BaseCollection &$collection )
applyOrder ( BaseCollection &$collection )
applyWhere ( BaseCollection &$collection )
by ( $column )
filter ( callback $filter ) Define filter for collection.
getForeignCollection ( )
getIterator ( ) To support foreach operation.
isHasMany ( )
isManyToMany ( )
isOneToMany ( )
isType ( $type )
newForeignCollection ( )
newForeignForeignCollection ( $junctionRelation ) : BaseCollection Resolve the junction relationship to retrieve foreign collection of the foreign collection.
newForeignModel ( )
newForeignSchema ( )
offsetExists ( $name )
offsetGet ( $name )
offsetSet ( $name, $value )
offsetUnset ( $name )
onDelete ( $action )
onUpdate ( $action )
order ( )
orderBy ( string $column, string $ordering ) Save order on the relationship.
usingIndex ( $index = true )
where ( $expr = null, array $args = [] )

Method Details

__call() public method

$relationship->foreign_schema('something') $relationship->view('something')
public __call ( $m, $as )

__construct() public method

public __construct ( $accessor, array $data = [] )
$data array

__get() public method

public __get ( $key )

__set() public method

public __set ( $key, $val )

__set_state() public static method

To support var_export.
public static __set_state ( array $data )
$data array

applyFilter() public method

public applyFilter ( BaseCollection &$collection )
$collection LazyRecord\BaseCollection

applyOrder() public method

public applyOrder ( BaseCollection &$collection )
$collection LazyRecord\BaseCollection

applyWhere() public method

public applyWhere ( BaseCollection &$collection )
$collection LazyRecord\BaseCollection

by() public method

public by ( $column )

filter() public method

Define filter for collection.
public filter ( callback $filter )
$filter callback filter callback.

getForeignCollection() public method

getIterator() public method

To support foreach operation.
public getIterator ( )

isHasMany() public method

public isHasMany ( )

isManyToMany() public method

public isManyToMany ( )

isOneToMany() public method

public isOneToMany ( )

isType() public method

public isType ( $type )

newForeignCollection() public method

newForeignForeignCollection() public method

This method is only for many-to-many relationship object.
public newForeignForeignCollection ( $junctionRelation ) : BaseCollection
return LazyRecord\BaseCollection The foreign foreign collection.

newForeignModel() public method

public newForeignModel ( )

newForeignSchema() public method

public newForeignSchema ( )

offsetExists() public method

public offsetExists ( $name )

offsetGet() public method

public offsetGet ( $name )

offsetSet() public method

public offsetSet ( $name, $value )

offsetUnset() public method

public offsetUnset ( $name )

onDelete() public method

public onDelete ( $action )

onUpdate() public method

public onUpdate ( $action )

order() public method

public order ( )

orderBy() public method

Save order on the relationship.
public orderBy ( string $column, string $ordering )
$column string
$ordering string

usingIndex() public method

public usingIndex ( $index = true )

where() public method

public where ( $expr = null, array $args = [] )
$args array

Property Details

$accessor public_oe property

The accessor name
public $accessor

$data public_oe property

The stashed data
public $data

$onDelete public_oe property

public $onDelete

$onUpdate public_oe property

public $onUpdate

$orderBy public_oe property

public $orderBy

$usingIndex public_oe property

public $usingIndex

$where public_oe property

The SQLBuilder Condition Syntax Object
public $where