for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Hook reaction class.
*
* @package wordpoints-hooks-api
* @since 1.0.0
*/
* Bootstrap for representing a hook reaction.
abstract class WordPoints_Hook_Reaction implements WordPoints_Hook_ReactionI {
protected $ID;
* The reaction storage object.
* @var WordPoints_Hook_Reaction_StoreI
protected $store;
//
// Public Methods.
* Construct the class for a hook reaction.
* @param int $id The ID of a hook reaction.
* @param WordPoints_Hook_Reaction_StoreI $store The storage object.
public function __construct( $id, WordPoints_Hook_Reaction_StoreI $store ) {
$this->ID = wordpoints_int( $id );
$this->store = $store;
}
public function get_id() {
return $this->ID;
public function get_guid() {
return array(
'id' => $this->ID,
'store' => $this->get_store_slug(),
'context_id' => $this->get_context_id(),
);
public function get_reactor_slug() {
return $this->get_meta( 'reactor' );
public function get_store_slug() {
return $this->store->get_slug();
public function get_context_id() {
return $this->store->get_context_id();
// EOF