Method | Description | |
---|---|---|
hasHasMany ( string $attr ) : boolean | Check if there is a has many association | |
hasMany ( string $attr, mixed $options = null ) : null | Create a has many relationship | |
hasManyClass ( string $attr ) : the | Check class from a relation, like hasManyClass("tickets") => "Ticket" | |
hasManyForeignKey ( string $attr ) : string | Check if there is a has many foreign key | |
push ( mixed $obj ) : pushed | Push an objet to a has many association |
Method | Description | |
---|---|---|
_checkAndReturnMany ( string $method, mixed $value ) : has | Check a has many association and returns it resolved, if exists. | |
_nullNotPresentIds ( string $klass, string $foreign, mixed $ids, string $id ) : null | Nullify foreign class keys not present in array | |
_pushLater ( mixed $obj ) : null | Send an object to push later | |
_resolveCollection ( string $attr, mixed $values ) : collections | Set values to a has many association, from an array | |
_resolveHasMany ( string $attr, mixed $value ) : collection | Resolve the has many association and returns the collection with values | |
_resolveIds ( string $attr, mixed $values = null ) : ids | Resolve has many ids |
public static hasHasMany ( string $attr ) : boolean | ||
$attr | string | attribute to check |
return | boolean |
public static hasManyClass ( string $attr ) : the | ||
$attr | string | attribute to check |
return | the | class |
public static hasManyForeignKey ( string $attr ) : string | ||
$attr | string | attribute |
return | string | foreign key |