PHP Class ActiveRecord\BelongsTo

class School extends ActiveRecord\Model } class Person extends ActiveRecord\Model { static $belongs_to = array( array('school') ); } Example using options: class School extends ActiveRecord\Model } class Person extends ActiveRecord\Model { static $belongs_to = array( array('school', 'primary_key' => 'school_id') ); }
See also: valid_association_options
See also: http://www.phpactiverecord.org/guides/associations
Inheritance: extends AbstractRelationship
Show file Open project: jpfuentes2/php-activerecord

Public Methods

Method Description
__construct ( $options = [] )
__get ( $name )
load ( activerecord\Model $model )
load_eagerly ( $models = [], $attributes, $includes, Table $table )

Method Details

__construct() public method

public __construct ( $options = [] )

__get() public method

public __get ( $name )

load() public method

public load ( activerecord\Model $model )
$model activerecord\Model

load_eagerly() public method

public load_eagerly ( $models = [], $attributes, $includes, Table $table )
$table Table