Trait JsonSerializable
Methods summary
public
|
|
public
string
|
#
toString( )
Return a JSON text of this model
Return a JSON text of this model
Returns
string
|
public
string
|
#
toJson( )
Return a JSON text of this model
Return a JSON text of this model
Returns
string
|
public
|
#
assign( Transactd\Model $src )
Copy contents of the original model.
Copy contents of the original model.
Parameters
Returns
$this
Throws
InvalidArgumentException
|
public static
Transactd\Model
|
#
createInstance( Transactd\Model $src = null )
Create a new instance or clone model
Create a new instance or clone model
Parameters
- $src
- (optional) For clone
Returns
|
public static
object
|
#
chengeObjectType( object $v, $parent, $name )
Change object types by 'className'.
Change object types by 'className'.
Parameters
Returns
object
|
public static
string
|
#
serializeToJson( object $obj )
Serializes to JSON string.
Serializes to JSON string.
Parameters
Returns
string
|
public static
object
|
#
deSerializeFromJson( string $json )
Deserializes from JSON string.
Deserializes from JSON string.
Parameters
Returns
object
|
public static
object
|
#
fromJson( string $json )
Deserializes from JSON string.
Deserializes from JSON string.
Parameters
Returns
object
|
Properties summary
protected
type
|
$className
A class name for serizlization.
A class name for serizlization.
|
|