PHP Class Apple_Exporter\Workspace

For WordPress, this is entirely handled using meta fields since the filesystem is unavailable on WordPress VIP and potentially other enterprise WordPress hosts.
Since: 0.2.0
Author: Federico Ramirez
Author: Bradford Campeau-Laurion
Mostrar archivo Open project: alleyinteractive/apple-news Class Usage Examples

Public Properties

Property Type Description
$content_id integer Current ID of the content we are constructing a workspace for.

Public Methods

Method Description
__construct ( integer $content_id ) Initialize.
bundle_source ( string $filename, string $source ) Adds a source file to be included later in the bundle.
clean_up ( ) Delete all bundle data from the post.
get_bundles ( ) : array Gets any bundles.
get_errors ( ) : array Gets errors encountered during publishing.
get_json ( ) : string Gets the JSON content.
log_error ( string $key, string $value ) Logs errors encountered during publishing.
write_json ( string $content ) Stores the JSON file for this workspace to be included in the bundle.

Method Details

__construct() public method

Initialize.
Since: 0.2.0
public __construct ( integer $content_id )
$content_id integer

bundle_source() public method

Adds a source file to be included later in the bundle.
Since: 0.9.0
public bundle_source ( string $filename, string $source )
$filename string
$source string

clean_up() public method

Delete all bundle data from the post.
Since: 0.2.0
public clean_up ( )

get_bundles() public method

Gets any bundles.
Since: 0.9.0
public get_bundles ( ) : array
return array

get_errors() public method

Gets errors encountered during publishing.
Since: 1.0.6
public get_errors ( ) : array
return array

get_json() public method

Gets the JSON content.
Since: 0.9.0
public get_json ( ) : string
return string

log_error() public method

Logs errors encountered during publishing.
Since: 1.0.6
public log_error ( string $key, string $value )
$key string
$value string

write_json() public method

Stores the JSON file for this workspace to be included in the bundle.
Since: 0.9.0
public write_json ( string $content )
$content string

Property Details

$content_id public_oe property

Current ID of the content we are constructing a workspace for.
Since: 0.9.0
public int $content_id
return integer