PHP 트레잇 TORM\HasMany

파일 보기 프로젝트 열기: taq/torm

공개 메소드들

메소드 설명
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

비공개 메소드들

메소드 설명
_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

메소드 상세

hasHasMany() 공개 정적인 메소드

Check if there is a has many association
public static hasHasMany ( string $attr ) : boolean
$attr string attribute to check
리턴 boolean

hasMany() 공개 정적인 메소드

Create a has many relationship
public static hasMany ( string $attr, mixed $options = null ) : null
$attr string attribute
$options mixed to use
리턴 null

hasManyClass() 공개 정적인 메소드

Check class from a relation, like hasManyClass("tickets") => "Ticket"
public static hasManyClass ( string $attr ) : the
$attr string attribute to check
리턴 the class

hasManyForeignKey() 공개 정적인 메소드

Check if there is a has many foreign key
public static hasManyForeignKey ( string $attr ) : string
$attr string attribute
리턴 string foreign key

push() 공개 메소드

Push an objet to a has many association
public push ( mixed $obj ) : pushed
$obj mixed object
리턴 pushed