Overview

Classes

  • xu
  • Xu\Foundation\Foundation
  • Xu\Foundation\Jsonable
  • Xu\Model\Collection
  • Xu\Model\Model

Functions

  • xu
  • xu_add_option
  • xu_attachment_url_to_postid
  • xu_cache_delete
  • xu_cache_delete_group
  • xu_cache_get
  • xu_cache_key
  • xu_camel_case
  • xu_clean_attachment_cache
  • xu_clean_nav_menu_cache
  • xu_clean_post_cache
  • xu_contains
  • xu_convert_to_string
  • xu_current_attachment_url_to_postid
  • xu_current_url
  • xu_current_url_to_postid
  • xu_dashify
  • xu_delete_option
  • xu_delete_site_transient
  • xu_delete_transient
  • xu_doing_ajax
  • xu_ends_with
  • xu_get_class_name
  • xu_get_model
  • xu_get_option
  • xu_get_option_name
  • xu_get_option_post_id
  • xu_get_posts
  • xu_get_site_transient
  • xu_get_top_parent_post
  • xu_get_top_parent_post_type
  • xu_get_top_parent_post_type_object
  • xu_get_transient
  • xu_is_empty
  • xu_is_http_method
  • xu_is_json
  • xu_is_post_type
  • xu_is_wp
  • xu_is_xml
  • xu_post_exists
  • xu_register_large_option_post_type
  • xu_snake_case
  • xu_starts_with
  • xu_strip_spaces
  • xu_studly_case
  • xu_update_option
  • xu_url_to_postid
  • xu_valid_personnummer
  • xu_wp_get_attachment_image
  • xu_wp_get_attachment_image_sizes
  • xu_wp_get_attachment_image_src
  • xu_wp_get_attachment_image_srcset
  • xu_wp_get_attachment_url
  • xu_wp_nav_menu
  • Overview
  • Class

Class Model

Xu\Foundation\Jsonable
Extended by Xu\Model\Model implements ArrayAccess
Abstract
Namespace: Xu\Model
Located at model/class-model.php
Methods summary
public boolean
# __isset( string $key )

Determine if a attribute exists or not.

Determine if a attribute exists or not.

Parameters

$key

Returns

boolean
public mixed
# __get( string $key )

Get post property by key.

Get post property by key.

Parameters

$key

Returns

mixed
public
# __set( string $key, mixed $value )

Set attribute value.

Set attribute value.

Parameters

$key
$value
public
# __unset( string $key )

Unset attribute key.

Unset attribute key.

Parameters

$key
public mixed
# __call( string $method, array $parameters = [] )

Call method with parameters.

Call method with parameters.

Parameters

$method
$name
$parameters

Returns

mixed
public static mixed
# __callStatic( string $method, array $parameters = [] )

Call static method with paramters.

Call static method with paramters.

Parameters

$method
$parameters

Returns

mixed
public static array
# collection( mixed $items = [] )

Create a collection of models.

Create a collection of models.

Parameters

$items

Returns

array
public static Xu\Model\Model
# create( array $attributes = [] )

Create a model from attributes.

Create a model from attributes.

Parameters

$attributes

Returns

Xu\Model\Model
public mixed
# get( string $key, mixed $default = null )

Get model attribute.

Get model attribute.

Parameters

$key
$default

Returns

mixed
public array
# get_attributes( )

Get the model attributes.

Get the model attributes.

Returns

array
public array
# get_attributes_array( )

Get attributes array.

Get attributes array.

Returns

array
public mixed
# get_model( string $model )

Get a model within a model instance.

Get a model within a model instance.

Parameters

$model

Returns

mixed
public static mixed
# model( )

Create a new model instance.

Create a new model instance.

Returns

mixed
public boolean
# offsetExists( mixed $offset )

Determine if the given offset exists.

Determine if the given offset exists.

Parameters

$offset

Returns

boolean

Implementation of

ArrayAccess::offsetExists()
public mixed
# offsetGet( mixed $offset )

Get the value for a given offset.

Get the value for a given offset.

Parameters

$offset

Returns

mixed

Implementation of

ArrayAccess::offsetGet()
public
# offsetSet( mixed $offset, mixed $value )

Set the value for a given offset.

Set the value for a given offset.

Parameters

$offset
$value

Implementation of

ArrayAccess::offsetSet()
public
# offsetUnset( mixed $offset )

Unset the value for a given offset.

Unset the value for a given offset.

Parameters

$offset

Implementation of

ArrayAccess::offsetUnset()
public
# set( string $key, mixed $value )

Set model attribute.

Set model attribute.

Parameters

$key
$value
public
# set_attributes( array $attributes )

Set attributes.

Set attributes.

Parameters

$attributes
public array
# to_array( )

Convert the model instance to an array.

Convert the model instance to an array.

Returns

array
Methods inherited from Xu\Foundation\Jsonable
json_serialize(), to_json()
Properties summary
protected array $attributes

Model attributes.

Model attributes.

# []
API documentation generated by ApiGen