/** * Method to get the total of products * * @return int */ protected function getContentCount() { // Get the main variables $bridge = MageBridge::getBridge(); $register = MageBridge::getRegister(); // Register this API-request $arguments = array(); $id = $register->add('api', 'magebridge_product.count', $arguments); // Build the bridge $bridge->build(); // Return the product-count $count = $register->getDataById($id); return $count; }
/** * Load the data from the bridge * * @param null * @return array */ public function getResponseData() { return MageBridge::getRegister()->getData('headers'); }