src/Models/ApiObject.php
public static function fetchAll()
    {
        //Hail Api Client
        $hail_api_client = new Client();

        $config = SiteConfig::current_site_config();
        $orgs_ids = json_decode($config->HailOrgsIDs);
        if (!$orgs_ids) {
            //No organisations configured
            $hail_api_client->handleException(new \Exception("You need at least 1 Hail Organisation configured to be able to fetch"));

            return false;
        }
        //Fetch objects for all configured Hail organisations
        foreach ($orgs_ids as $org_id) {
            self::fetchForOrg($hail_api_client, $org_id);
        }
    }
public static function fetchAll()
    {
        //Hail Api Client
        $hail_api_client = new Client();

        $config = SiteConfig::current_site_config();
        $orgs_ids = json_decode($config->HailOrgsIDs);
        if (!$orgs_ids) {
            //No organisations configured
            $hail_api_client->handleException(new \Exception("You need at least 1 Hail Organisation configured to be able to fetch"));

            return false;
        }
        //Fetch objects for all configured Hail organisations
        foreach ($orgs_ids as $org_id) {
            self::fetchForOrg($hail_api_client, $org_id);
        }
    }
public static function fetchAll ( ) { //Hail Api Client $ hail_api_client = new Client ( ) ; $ config = SiteConfig :: current_site_config ( ) ; $ orgs_ids = json_decode ( $ config -> HailOrgsIDs ) ; if ( ! $ orgs_ids ) { //No organisations configured $ hail_api_client -> handleException ( new \ Exception ( "You need at least 1 Hail Organisation configured to be able to fetch" ) ) ; return false ; } //Fetch objects for all configured Hail organisations foreach ( $ orgs_ids as $ org_id ) { self :: fetchForOrg ( $ hail_api_client , $ org_id ) ; } }
Fetch from Hail API for all configured organisations

@throws
Fetch from Hail API for all configured organisations