zajModelLocalizerItem


zajModelLocalizerItem is a class which is used for database value localization features.

Any time you access data via zajModel‘s translation property you will get a zajModelLocalizerItem object.

Important! Most often you will not need to use this API directly. Instead refer to the documentation on database value localization features.

Magic methods

__get()

@todo need to figure out what this does. 🙂

__toString()

Will return the localized value based on the object’s locale. This means you can simply echo or print the object.

jsonSerialize()

Gets data ready for json serialization (returns the __toString value). This means you can use json_encode() on the object.

get()

Returns the translation for the object’s set locale.

@return mixed Return the translated value according to the object’s locale.

get_by_locale()

Returns the translation for the given locale. It can be set to another locale if desired. If nothing set, the field’s default value will be returned (so the one set in the main zajModel object field).

@param string|boolean $locale The locale. If not set (or default locale set), the default value is returned from the original zajModel object field.
@return mixed Return the translated value.

Outlast Web & Mobile Development (c) 2023 | Privacy Policy |