PHP Trait Isswp101\Persimmon\Traits\Presentable

Show file Open project: isswp101/elasticsearch-eloquent

Public Methods

Method Description
__toString ( ) : string Get the instance as a string.
toArray ( ) : array Get the instance as an array.
toCollection ( ) : Collection Get the instance as a collection.
toJson ( integer $options ) : string Get the instance as json.

Method Details

__toString() public method

Get the instance as a string.
public __toString ( ) : string
return string

toArray() public method

Get the instance as an array.
public toArray ( ) : array
return array

toCollection() public method

Get the instance as a collection.
public toCollection ( ) : Collection
return Illuminate\Support\Collection

toJson() public method

Get the instance as json.
public toJson ( integer $options ) : string
$options integer
return string