__construct()
__get()
__set()
__toString()
buildData()
checkRequiredAPIFields()
create()
createByType()
createNew()
delete()
get()
getAPIFields()
getAll()
getAvailableFilterMethods()
getAvailableOrderMethods()
getController()
getDate()
getDefinition()
getId()
getName()
getOption()
getRawValue()
getRequiredAPIFields()
getTimestamp()
getTitle()
getType()
getValue()
isNew()
isReadOnly()
refresh()
save()
setDate()
setReadOnly()
setTimestamp()
setValue()
toString()
update()
buildDataBool()
buildDataList()
buildDataNumeric()
buildDataString()
getRESTClient()
parseData()
initAPIFieldsAccessors()
$_filter_methods
$_order_methods
$controller
$custom_field_group
$definition
$id
$name
$object_xml_name
$raw_value
$read_only
$title
$type
$_api_fields
$timestamp
FILES_DATA_NAME
Class for date custom field.
All objects interacting with Kayako REST API should extend this class and define: * Kayako controller * XML element name holding object's data in REST response
| author | Tomasz Sawicki (https://github.com/Furgas) |
|---|---|
| since | Kayako version 4.40.1079 |
| package | Object\CustomField |
__construct(\kyCustomFieldGroupBase $custom_field_group, array $data)
| inherited_from | \kyCustomField::__construct() |
|---|
arrayObject data from XML response converted into array.
__get(string $api_field_name) : mixed
Returns API field value based on API field name used by Kayako.
| link | http://wiki.kayako.com/display/DEV/REST+API+Reference |
|---|---|
| inherited_from | \kyObjectBase::__get() |
| inherited_from | \kyCustomField::__get() |
stringAPI field name.
mixed__set(string $api_field_name, mixed $value) : mixed
Sets API field value based on API field name used by Kayako.
| link | http://wiki.kayako.com/display/DEV/REST+API+Reference |
|---|---|
| inherited_from | \kyObjectBase::__set() |
| inherited_from | \kyCustomField::__set() |
stringAPI field name.
mixedAPI field value.
mixed__toString() : string
Calls toString() method to get the object description.
| inherited_from | \kyCustomField::__toString() |
|---|
stringbuildData(bool $create) : array
Values must be set in format accepted by REST API.
| inherited_from | \kyCustomField::buildData() |
|---|
boolIndicates if the result will be used to create (true) or update (false) an object.
arraycheckRequiredAPIFields(bool $create, bool $throw_exception) : string[] | bool
| inherited_from | \kyObjectBase::checkRequiredAPIFields() |
|---|---|
| inherited_from | \kyCustomField::checkRequiredAPIFields() |
boolTrue when object will be created. False when object will be updated.
boolTrue to throw an exception on missing fields. False to return list of missing fields or true when there are none.
\kyException |
When there are missing field values and $throw_exception is true. |
|---|
string[]boolList of missing API fields or true when there are none.create() : \kyObjectBase
createByType(\kyCustomFieldGroupBase $custom_field_group, array $data) : \kyCustomField
| inherited_from | \kyCustomField::createByType() |
|---|
arrayObject data from XML response.
\DomainException |
|---|
createNew()
Compatible with method chaining.
| inherited_from | \kyObjectBase::createNew() |
|---|---|
| inherited_from | \kyCustomField::createNew() |
delete()
| inherited_from | \kyCustomField::delete() |
|---|
get(int | array $id) : \kyObjectBase
| inherited_from | \kyCustomField::get() |
|---|
intarrayObject identifier or list of identifiers (ex. ticket identifier and ticket post identifier when fetching TicketPost).
getAPIFields() : string[]
Format of returned array:
array(
'' => Field description. (getter: , setter: ),
...repeat...
)
| inherited_from | \kyObjectBase::getAPIFields() |
|---|---|
| inherited_from | \kyCustomField::getAPIFields() |
string[]getAll(array $search_parameters) : \kyResultSet
| inherited_from | \kyCustomField::getAll() |
|---|
arrayOptional. Additional search parameters.
getAvailableFilterMethods(bool $filter_names_only) : array
Optionaly you can return get method names used to filter objects.
| inherited_from | \kyObjectBase::getAvailableFilterMethods() |
|---|---|
| inherited_from | \kyCustomField::getAvailableFilterMethods() |
boolTrue (default) to return array('filterByXXX', 'filterByYYY', ...). False to return array('filterByXXX' => 'getXXX', 'filterByYYY' => 'YYY', ...).
arraygetAvailableOrderMethods(bool $order_names_only) : array
Optionaly you can return get method names used to order objects.
| inherited_from | \kyObjectBase::getAvailableOrderMethods() |
|---|---|
| inherited_from | \kyCustomField::getAvailableOrderMethods() |
boolTrue (default) to return array('orderByXXX', 'orderByYYY', ...). False to return array('orderByXXX' => 'getXXX', 'orderByYYY' => 'YYY', ...).
arraygetController() : string
| inherited_from | \kyObjectBase::getController() |
|---|---|
| inherited_from | \kyCustomField::getController() |
stringgetDate(string $format) : string
stringOutput format of the date. If null the format set in client configuration is used.
stringgetDefinition(bool $reload) : \kyCustomFieldDefinition
| inherited_from | \kyCustomField::getDefinition() |
|---|
boolTrue to reload data from server. False to use the cached value (if present).
getId(bool $complete) : int | array
ticket identifier and ticket post identifier in case of TicketPost).
| inherited_from | \kyCustomField::getId() |
|---|
boolTrue to return complete list of identifiers as needed by API to identify the object.
intarray
getName() : string
| filterBy | |
|---|---|
| orderBy | |
| inherited_from | \kyCustomField::getName() |
stringgetOption(mixed $value) : \kyCustomFieldOption
Returns null if option was not found.
| inherited_from | \kyCustomField::getOption() |
|---|
mixedIdentifier of option OR value of option OR option.
getRawValue() : string
| filterBy | |
|---|---|
| orderBy | |
| inherited_from | \kyCustomField::getRawValue() |
stringgetRequiredAPIFields(bool $create) : string[]
| inherited_from | \kyObjectBase::getRequiredAPIFields() |
|---|---|
| inherited_from | \kyCustomField::getRequiredAPIFields() |
boolTrue when object will be created. False when object will be updated.
string[]getTimestamp() : int
intgetTitle() : string
| filterBy | |
|---|---|
| orderBy | |
| inherited_from | \kyCustomField::getTitle() |
stringgetType() : int
| filterBy | |
|---|---|
| orderBy | |
| inherited_from | \kyCustomField::getType() |
intgetValue() : string
Default format from client configuration is used.
| see | \global\kyCustomField::getValue() |
|---|---|
| see | \global\kyCustomFieldDate::getDate() |
stringisNew() : bool
| inherited_from | \kyObjectBase::isNew() |
|---|---|
| inherited_from | \kyCustomField::isNew() |
boolisReadOnly() : bool
| inherited_from | \kyObjectBase::isReadOnly() |
|---|---|
| inherited_from | \kyCustomField::isReadOnly() |
boolsetReadOnly(bool $read_only) : bool
| inherited_from | \kyObjectBase::setReadOnly() |
|---|---|
| inherited_from | \kyCustomField::setReadOnly() |
boolRead only flag.
boolsetValue(string $value) : \kyCustomFieldDate
Method is overloaded in descendant classes and value interpretation depends on field type.
| see | \global\kyCustomField::setValue() |
|---|---|
| see | \global\kyCustomFieldDate::setDate() |
stringDate in format understood by PHP strtotime.
toString() : string
| inherited_from | \kyCustomField::toString() |
|---|
stringupdate() : \kyObjectBase
buildDataBool(array $data, string $field_name, mixed $field_value)
| inherited_from | \kyObjectBase::buildDataBool() |
|---|---|
| inherited_from | \kyCustomField::buildDataBool() |
arrayData used to create or update the object.
stringField name.
mixedField value.
buildDataList(array $data, string $field_name, mixed $field_value)
| inherited_from | \kyObjectBase::buildDataList() |
|---|---|
| inherited_from | \kyCustomField::buildDataList() |
arrayData used to create or update the object.
stringField name.
mixedField value.
buildDataNumeric(array $data, string $field_name, mixed $field_value)
| inherited_from | \kyObjectBase::buildDataNumeric() |
|---|---|
| inherited_from | \kyCustomField::buildDataNumeric() |
arrayData used to create or update the object.
stringField name.
mixedField value.
buildDataString(array $data, string $field_name, mixed $field_value)
| inherited_from | \kyObjectBase::buildDataString() |
|---|---|
| inherited_from | \kyCustomField::buildDataString() |
arrayData used to create or update the object.
stringField name.
mixedField value.
getRESTClient() : \kyRESTClientInterface
| inherited_from | \kyObjectBase::getRESTClient() |
|---|---|
| inherited_from | \kyCustomField::getRESTClient() |
parseData(array $data)
arrayObject data from XML response.
initAPIFieldsAccessors()
Scans protected and private properties of called class, searches for
| apiField | [name=field name]{0,1} [alias=field name alias]* [accessor=setter/getter name]{0,1} [getter=getter name]{0,1} [setter=setter name]{0,1} [required_create=true if field if required when creating object]{0,1} [required_update=true if field if required when udpating object]{0,1} [required=true if field if required when creating or updating object]{0,1} and builds API field list with property name, description, setter and getter method names, and required flags. |
|---|---|
| see | \global\kyObjectBase::$_api_fields |
| inherited_from | \kyObjectBase::initAPIFieldsAccessors() |
| inherited_from | \kyCustomField::initAPIFieldsAccessors() |
$_filter_methods : string[]
Format:
array(
'
| inherited_from | \kyObjectBase::$$_filter_methods |
|---|---|
| inherited_from | \kyCustomField::$$_filter_methods |
$_order_methods : string[]
Format:
array(
'
| inherited_from | \kyObjectBase::$$_order_methods |
|---|---|
| inherited_from | \kyCustomField::$$_order_methods |
$controller : string
Override in descending classes.
| inherited_from | \kyObjectBase::$$controller |
|---|---|
| inherited_from | \kyCustomField::$$controller |
$custom_field_group : \kyCustomFieldGroupBase
| inherited_from | \kyCustomField::$$custom_field_group |
|---|
$definition : \kyCustomFieldDefinition
| inherited_from | \kyCustomField::$$definition |
|---|
$id : int
| apiField | |
|---|---|
| inherited_from | \kyCustomField::$$id |
$name : string
| apiField | |
|---|---|
| inherited_from | \kyCustomField::$$name |
$object_xml_name : string
Override in descending classes.
| inherited_from | \kyObjectBase::$$object_xml_name |
|---|---|
| inherited_from | \kyCustomField::$$object_xml_name |
$raw_value : string
| apiField | name=value getter=getRawValue setter=setValue |
|---|---|
| inherited_from | \kyCustomField::$$raw_value |
$read_only : bool
Override in descending classes.
| inherited_from | \kyObjectBase::$$read_only |
|---|---|
| inherited_from | \kyCustomField::$$read_only |
$title : string
| apiField | |
|---|---|
| inherited_from | \kyCustomField::$$title |
$type : int
| apiField | |
|---|---|
| inherited_from | \kyCustomField::$$type |
$_api_fields : array
Format:
array(
'
| inherited_from | \kyObjectBase::$$_api_fields |
|---|---|
| inherited_from | \kyCustomField::$$_api_fields |
FILES_DATA_NAME : string
| inherited_from | \kyObjectBase::FILES_DATA_NAME |
|---|---|
| inherited_from | \kyCustomField::FILES_DATA_NAME |