\Object_Sync_Sf_Rest

Create WordPress REST API functionality

Summary

Methods
Properties
Constants
__construct()
add_actions()
register_routes()
check_class()
check_id()
can_process()
process()
No public properties found
No constants found
No protected methods found
$wpdb
$version
$slug
$option_prefix
$wordpress
$salesforce
$mappings
$push
$pull
N/A
No private methods found
No private properties found
N/A

Properties

$wpdb

$wpdb : 

Type

$version

$version : 

Type

$slug

$slug : 

Type

$option_prefix

$option_prefix : 

Type

$wordpress

$wordpress : 

Type

$salesforce

$salesforce : 

Type

$mappings

$mappings : 

Type

$push

$push : 

Type

$pull

$pull : 

Type

Methods

__construct()

__construct(object  $wpdb, string  $version, string  $slug, string  $option_prefix, object  $wordpress, object  $salesforce, object  $mappings, object  $push, object  $pull) 

Constructor which sets up rest methods

Parameters

object $wpdb
string $version
string $slug
string $option_prefix
object $wordpress
object $salesforce
object $mappings
object $push
object $pull

Throws

\Exception

add_actions()

add_actions() 

Create the action hooks to create the reset methods

Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jstegall/Sites/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jstegall/Sites/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293

register_routes()

register_routes() 

Register REST API routes

Throws

\Exception

check_class()

check_class(string  $class) : boolean

Check for a valid class from the parameter

Parameters

string $class
Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jstegall/Sites/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jstegall/Sites/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293

Returns

boolean

check_id()

check_id(string  $id) : boolean

Check for a valid ID from the parameter

Parameters

string $id
Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jstegall/Sites/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jstegall/Sites/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293

Returns

boolean

can_process()

can_process(\WP_REST_Request  $request) 

Check to see if the user has permission to do this

Parameters

\WP_REST_Request $request

Throws

\Exception

process()

process(\WP_REST_Request  $request) : \$result

Process the REST API request

Parameters

\WP_REST_Request $request
Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jstegall/Sites/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jstegall/Sites/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293

Returns

\$result