Source API for the «PorteTypesBinary» class

Type class to interact with "binary" content.

Public static methods

sanitize

This method is not yet documented.

tableUpdate

This method is not yet documented.

toDb

This method is not yet documented.

fromDb
return
PorteRecord
Current record
$property
string, Model
property
$record
PorteRecord, Record
to work on
$value
string, Value
returned by the sql query

Store a value retrieve from the database to the internal record store.

get
return
string
Value associated with the property
string
$property, Property
of the record
PorteRecord
$record, Record
on which to get the property

Return the value of a record property as a string.

set
return
PorteRecord
Provided record
Property
$property, to
set
PorteRecord
$record, Record
on which to set the property
mixed
$value, Value
to set
array
$options, mixed
Value to set

Set a value to the record store and also honore "null_if" and "default_if" model configuration.

Options may include:

- null_if: set the value to null if value match
- default_if: set the value to the default value match
hasChanged
return
boolean
True if the property has been modified
$property
string
$record
PorteRecord

Check if a property value has been modified.

The method is only called if a record is not new and if the property is present in "_data.user".

If the record is not yet loaded, we return true without loading it.

save

Update the record data state and enrich the property to value array used to build the SQL query in insert and update.

fromArray

This method is not yet documented.

toArray

This method is not yet documented.