PHP 클래스 Flarum\Api\Serializer\AbstractSerializer

상속: extends Tobscure\JsonApi\AbstractSerializer
파일 보기 프로젝트 열기: flarum/core 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$actor Flarum\Core\User
$container Illuminate\Contracts\Container\Container
$dispatcher Illuminate\Contracts\Events\Dispatcher

공개 메소드들

메소드 설명
getActor ( ) : User
getAttributes ( $model, array $fields = null )
getContainer ( ) : Illuminate\Contracts\Container\Container
getEventDispatcher ( ) : Illuminate\Contracts\Events\Dispatcher
getRelationship ( $model, $name )
hasMany ( mixed $model, string | Closur\Closure | Tobscure\JsonApi\SerializerInterface $serializer, string | null $relation = null ) : Relationship Get a relationship builder for a has-many relationship.
hasOne ( mixed $model, string | Closur\Closure | Tobscure\JsonApi\SerializerInterface $serializer, string | Closur\Closure | null $relation = null ) : Relationship Get a relationship builder for a has-one relationship.
setActor ( User $actor )
setContainer ( Illuminate\Contracts\Container\Container $container )
setEventDispatcher ( Illuminate\Contracts\Events\Dispatcher $dispatcher )

보호된 메소드들

메소드 설명
buildRelationship ( mixed $model, string | Closur\Closure | Tobscure\JsonApi\SerializerInterface $serializer, string | null $relation = null, boolean $many = false ) : Relationship
formatDate ( DateTime $date = null ) : string | null
getCustomRelationship ( mixed $model, string $name ) : Relationship | null Get a custom relationship.
getDefaultAttributes ( object | array $model ) : array Get the default set of serialized attributes for a model.
getRelationshipData ( mixed $model, $relation ) : mixed
resolveSerializer ( mixed $serializer, mixed $model, mixed $data ) : Tobscure\JsonApi\SerializerInterface
resolveSerializerClass ( string $class ) : object

메소드 상세

buildRelationship() 보호된 메소드

protected buildRelationship ( mixed $model, string | Closur\Closure | Tobscure\JsonApi\SerializerInterface $serializer, string | null $relation = null, boolean $many = false ) : Relationship
$model mixed
$serializer string | Closur\Closure | Tobscure\JsonApi\SerializerInterface
$relation string | null
$many boolean
리턴 Tobscure\JsonApi\Relationship

formatDate() 보호된 메소드

protected formatDate ( DateTime $date = null ) : string | null
$date DateTime
리턴 string | null

getActor() 공개 메소드

public getActor ( ) : User
리턴 Flarum\Core\User

getAttributes() 공개 메소드

public getAttributes ( $model, array $fields = null )
$fields array

getContainer() 공개 정적인 메소드

public static getContainer ( ) : Illuminate\Contracts\Container\Container
리턴 Illuminate\Contracts\Container\Container

getCustomRelationship() 보호된 메소드

Get a custom relationship.
protected getCustomRelationship ( mixed $model, string $name ) : Relationship | null
$model mixed
$name string
리턴 Tobscure\JsonApi\Relationship | null

getDefaultAttributes() 추상적인 보호된 메소드

Get the default set of serialized attributes for a model.
abstract protected getDefaultAttributes ( object | array $model ) : array
$model object | array
리턴 array

getEventDispatcher() 공개 정적인 메소드

public static getEventDispatcher ( ) : Illuminate\Contracts\Events\Dispatcher
리턴 Illuminate\Contracts\Events\Dispatcher

getRelationship() 공개 메소드

public getRelationship ( $model, $name )

getRelationshipData() 보호된 메소드

protected getRelationshipData ( mixed $model, $relation ) : mixed
$model mixed
리턴 mixed

hasMany() 공개 메소드

Get a relationship builder for a has-many relationship.
public hasMany ( mixed $model, string | Closur\Closure | Tobscure\JsonApi\SerializerInterface $serializer, string | null $relation = null ) : Relationship
$model mixed
$serializer string | Closur\Closure | Tobscure\JsonApi\SerializerInterface
$relation string | null
리턴 Tobscure\JsonApi\Relationship

hasOne() 공개 메소드

Get a relationship builder for a has-one relationship.
public hasOne ( mixed $model, string | Closur\Closure | Tobscure\JsonApi\SerializerInterface $serializer, string | Closur\Closure | null $relation = null ) : Relationship
$model mixed
$serializer string | Closur\Closure | Tobscure\JsonApi\SerializerInterface
$relation string | Closur\Closure | null
리턴 Tobscure\JsonApi\Relationship

resolveSerializer() 보호된 메소드

protected resolveSerializer ( mixed $serializer, mixed $model, mixed $data ) : Tobscure\JsonApi\SerializerInterface
$serializer mixed
$model mixed
$data mixed
리턴 Tobscure\JsonApi\SerializerInterface

resolveSerializerClass() 보호된 메소드

protected resolveSerializerClass ( string $class ) : object
$class string
리턴 object

setActor() 공개 메소드

public setActor ( User $actor )
$actor Flarum\Core\User

setContainer() 공개 정적인 메소드

public static setContainer ( Illuminate\Contracts\Container\Container $container )
$container Illuminate\Contracts\Container\Container

setEventDispatcher() 공개 정적인 메소드

public static setEventDispatcher ( Illuminate\Contracts\Events\Dispatcher $dispatcher )
$dispatcher Illuminate\Contracts\Events\Dispatcher

프로퍼티 상세

$actor 보호되어 있는 프로퍼티

protected User,Flarum\Core $actor
리턴 Flarum\Core\User

$container 보호되어 있는 정적으로 프로퍼티

protected static Container,Illuminate\Contracts\Container $container
리턴 Illuminate\Contracts\Container\Container

$dispatcher 보호되어 있는 정적으로 프로퍼티

protected static Dispatcher,Illuminate\Contracts\Events $dispatcher
리턴 Illuminate\Contracts\Events\Dispatcher