ICanBoogie
  • Documentation
  • API Reference
  • ActiveRecord 4.0.x
Namespaces
  • ICanBoogie
    • ActiveRecord
      • ActiveRecordCache
      • Driver
      • Property
      • Validate
        • Reader
        • Validator
        • ValidatorProvider
Classes
  • BelongsToRelation
  • Connection
  • ConnectionCollection
  • ConnectionOptions
  • HasManyRelation
  • Model
  • ModelCollection
  • ModelProvider
  • Query
  • Relation
  • RelationCollection
  • RelationNotDefined
  • Schema
  • SchemaColumn
  • Statement
  • Table
Interfaces
  • ActiveRecordCache
  • Driver
  • Exception
Exceptions
  • ActiveRecordClassNotValid
  • ConnectionAlreadyEstablished
  • ConnectionNotDefined
  • ConnectionNotEstablished
  • DriverNotDefined
  • ModelAlreadyInstantiated
  • ModelNotDefined
  • RecordNotFound
  • RecordNotValid
  • ScopeNotDefined
  • StatementInvocationFailed
  • StatementNotValid
  • UnableToSetFetchMode

Class BelongsToRelation

Representation of the one-to-one relation.

ICanBoogie\ActiveRecord\Relation uses ICanBoogie\Accessor\AccessorTrait (not available)
┗ ICanBoogie\ActiveRecord\BelongsToRelation
Namespace: ICanBoogie\ActiveRecord
Located at ActiveRecord/BelongsToRelation.php

Methods summary

public __construct( ICanBoogie\ActiveRecord\Model $parent, ICanBoogie\ActiveRecord\Model|string $related, array $options = [] )

Parameters

$parent
$related
$options

Overrides

ICanBoogie\ActiveRecord\Relation::__construct
public __invoke( ICanBoogie\ActiveRecord $record ) : ICanBoogie\ActiveRecord\Query

Parameters

$record

Returns

ICanBoogie\ActiveRecord\Query

Inheritdoc

protected alter_prototype( ICanBoogie\Prototype $prototype, string $property )

Adds a setter for the property to update the local key.

Adds a setter for the property to update the local key.

Parameters

$prototype
The active record prototype.
$property
The name of the property.

Inheritdoc

Overrides

ICanBoogie\ActiveRecord\Relation::alter_prototype
protected resolve_property_name( ICanBoogie\ActiveRecord\Model|string $related ) : string

Parameters

$related
The related model of the relation.

Returns

string

Inheritdoc

Overrides

ICanBoogie\ActiveRecord\Relation::resolve_property_name

Methods inherited from ICanBoogie\ActiveRecord\Relation

get_as(), get_foreign_key(), get_local_key(), get_parent(), get_related(), resolve_activerecord_class(), resolve_related()

Properties summary

Properties inherited from ICanBoogie\ActiveRecord\Relation

$as, $foreign_key, $local_key, $parent, $related

Magic properties inherited from ICanBoogie\ActiveRecord\Relation

$as, $foreign_key, $local_key, $parent, $related

ActiveRecord 4.0.x – Check on GitHub – API documentation generated by ApiGen