ActiveRecord\BelongsTo::__get PHP Method

__get() public method

public __get ( $name )
    public function __get($name)
    {
        if ($name === 'primary_key' && !isset($this->primary_key)) {
            $this->primary_key = array(Table::load($this->class_name)->pk[0]);
        }
        return $this->{$name};
    }