Functions
Returns specified value as array.
ky_assure_array(mixed $value, mixed $value_on_null) : mixed
Parameters
$value_on_null
mixed
What to return if value is null.
Returns
mixed
Returns specified value as bool.
ky_assure_bool(mixed $value) : bool
Assures that specified value is proper constant value.
ky_assure_constant(mixed $value, string | object $object_or_class_name, string $constant_prefix, mixed $value_on_invalid_constant) : mixed
Parameters
$object_or_class_name
string
object
Object or class name with constants.
$constant_prefix
string
Constants prefix (without last '_').
$value_on_invalid_constant
mixed
What to return if value is not a valid constant.
Returns
mixed
Returns specified value as int.
ky_assure_int(mixed $value, int | null $value_on_null) : int | null
Parameters
$value_on_null
int
null
What to return if value is null.
Returns
int
null
Returns specified object only if it is an instance of specified class.
ky_assure_object(object $object, string $class_name, mixed $value_on_invalid_object) : mixed
Parameters
$class_name
string
Class name to check for.
$value_on_invalid_object
mixed
What to return if object is not an instance os specified class.
Returns
mixed
Returns specified value as positive int.
ky_assure_positive_int(mixed $value, int | null $value_on_non_positive) : int | null
Parameters
$value_on_non_positive
int
null
What to return if value non-positive (including null).
Returns
int
null
Returns specified value as string.
ky_assure_string(mixed $value, string | null $value_on_null) : string | null
Parameters
$value_on_null
string
null
What to return if value is null.
Returns
string
null
Returns field value from POST data.
ky_get_post_value(\kyCustomFieldDefinition $custom_field_definition) : mixed
Parameters
Exceptions
Returns
mixed
Field value.
Returns custom PHPDoc tag parameter list.
ky_get_tag_parameters(string $comment, string $tag_name) : bool | array
Custom PHPDoc used by this library tags have following format:
tagName |
parameter1=value parameter2=value ... |
Parameters
$comment
string
PHPDoc block.
$tag_name
string
Custom tag name.
Returns
bool
array
List of parameters (may be empty if tag is parameter-less) or false when tag was not found.
Helper function for sorting array with parametrized callback.
ky_usort_comparison(callback $callback, array $arguments) : callback
Parameters
$callback
callback
Sorting callback.
$arguments
array
List of arguments to sorting callback.
Returns
callback
Transforms XML data to array.
ky_xml_to_array(string $xml, string[] $namespaces) : array
Parameters
$namespaces
string[]
List of namespaces to include in parsing or empty to include all namespaces.
Returns
array
Classes and interfaces
kyRESTClientInterface¶
Interface of REST client.
« More »
kyConfig¶
Class holding library configuration.
« More »
kyCustomField¶
Class for custom field with text value and base class for other types of custom fields.
« More »
kyCustomFieldDate¶
Class for date custom field.
« More »
kyCustomFieldDefinition¶
Class for custom field definition (properties).
« More »
kyCustomFieldFile¶
Class for file custom field.
« More »
kyCustomFieldGroupBase¶
Base class for custom field group.
« More »
kyCustomFieldLinkedSelect¶
Class for linked select custom field.
« More »
kyCustomFieldMultiSelect¶
Class for select custom field with multiple options.
« More »
kyCustomFieldOption¶
Class for custom fields options.
« More »
kyCustomFieldSelect¶
Class for select custom field with single option.
« More »
kyDepartment¶
Kayako Department object.
« More »
kyException¶
Base exception class used by library.
« More »
kyObjectBase¶
Base class for getting, creating, updating and deleting Kayako objects.
« More »
kyObjectWithCustomFieldsBase¶
Base class for Kayako object with custom fields.
« More »
kyRESTClient¶
Default REST client implementation.
« More »
kyResultSet¶
List of objects on steroids.
« More »
kyStaffGroup¶
Kayako StaffGroup object.
« More »
kyTicketAttachment¶
Kayako TicketAttachment object.
« More »
kyTicketCustomFieldGroup¶
Kayako TicketCustomField object.
« More »
kyTicketNote¶
Kayako TicketNote object.
« More »
kyTicketPost¶
Kayako TicketPost object.
« More »
kyTicketPriority¶
Kayako TicketPriority object.
« More »
kyTicketStatus¶
Kayako TicketStatus object.
« More »
kyTicketTimeTrack¶
Kayako TicketTimeTrack object.
« More »
kyTicketType¶
Kayako TicketType object.
« More »
kyUserGroup¶
Kayako UserGroup object.
« More »
kyUserOrganization¶
Kayako UserOrganization object.
« More »
kyUsort¶
Helper class for sorting array with parametrized callback.
« More »