PHP Class PluginUpdate_1_3, bp-reply-by-email

Author: Janis Elsts
显示文件 Open project: r-a-y/bp-reply-by-email Class Usage Examples

Public Properties

Property Type Description
$download_url
$homepage
$id
$slug
$upgrade_notice
$version

Public Methods

Method Description
fromJson ( string $json, boolean $triggerErrors = false ) : PluginUpdate | null Create a new instance of PluginUpdate from its JSON-encoded representation.
fromObject ( StdClass | PluginInfo | PluginUpdate $object ) : PluginUpdate Create a new instance of PluginUpdate by copying the necessary fields from another object.
fromPluginInfo ( PluginInfo $info ) : PluginUpdate Create a new instance of PluginUpdate based on an instance of PluginInfo.
toStdClass ( ) : StdClass Create an instance of StdClass that can later be converted back to a PluginUpdate. Useful for serialization and caching, as it avoids the "incomplete object" problem if the cached value is loaded before this class.
toWpFormat ( ) : object Transform the update into the format used by WordPress native plugin API.

Method Details

fromJson() public static method

Create a new instance of PluginUpdate from its JSON-encoded representation.
public static fromJson ( string $json, boolean $triggerErrors = false ) : PluginUpdate | null
$json string
$triggerErrors boolean
return PluginUpdate | null

fromObject() public static method

Create a new instance of PluginUpdate by copying the necessary fields from another object.
public static fromObject ( StdClass | PluginInfo | PluginUpdate $object ) : PluginUpdate
$object StdClass | PluginInfo | PluginUpdate The source object.
return PluginUpdate The new copy.

fromPluginInfo() public static method

Basically, this just copies a subset of fields from one object to another.
public static fromPluginInfo ( PluginInfo $info ) : PluginUpdate
$info PluginInfo
return PluginUpdate

toStdClass() public method

Create an instance of StdClass that can later be converted back to a PluginUpdate. Useful for serialization and caching, as it avoids the "incomplete object" problem if the cached value is loaded before this class.
public toStdClass ( ) : StdClass
return StdClass

toWpFormat() public method

Transform the update into the format used by WordPress native plugin API.
public toWpFormat ( ) : object
return object

Property Details

$download_url public_oe property

public $download_url

$homepage public_oe property

public $homepage

$id public_oe property

public $id

$slug public_oe property

public $slug

$upgrade_notice public_oe property

public $upgrade_notice

$version public_oe property

public $version