public function __construct() { //Store json_decode array in api1 $api1 = ConfigURL::getURL(ApiList::$name); //Check if products are received, if true, store them in $_products, else get the error received from ConfigURL class if (isset($api1['products'])) { $this->_products = $api1['products']; } else { $this->_errors = ConfigURL::errors(); } }