PHP Class Apple_Actions\Index\Push

Inheritance: extends Apple_Actions\API_Action
Datei anzeigen Open project: alleyinteractive/apple-news Class Usage Examples

Public Methods

Method Description
__construct ( Settings $settings, integer $id ) Constructor.
perform ( boolean $doing_async = false, $user_id = null ) : boolean Perform the push action.

Private Methods

Method Description
clean_workspace ( ) Clean up the workspace.
generate_article ( ) Use the export action to get an instance of the Exporter. Use that to manually generate the workspace for upload, then clean it up.
get ( ) Get the post using the API data.
is_post_in_sync ( ) : boolean Check if the post is in sync before updating in Apple News.
process_errors ( array $errors ) Processes errors, halts publishing if needed.
push ( integer $user_id = null ) Push the post using the API data.

Method Details

__construct() public method

Constructor.
public __construct ( Settings $settings, integer $id )
$settings Settings
$id integer

perform() public method

Perform the push action.
public perform ( boolean $doing_async = false, $user_id = null ) : boolean
$doing_async boolean
return boolean