src/Facility.php
/**
     * Create a Facility from a Facility Code.
     *
     * @param string $facilityCode
     * @return null|Facility
     */
Create a Facility from a Facility Code.
@param string $facilityCode
@return null|Facility
Create a Facility from a Facility Code . @param string $facilityCode @return null|Facility
public static function fromFacilityCode($facilityCode)
    {
        $result = static::search("facility_code=$facilityCode");
        if (count($result) != 1) {
            throw new \Exception("Not exactly one facility found for $facilityCode");
        }
        return $result[0];
    }
public static function fromFacilityCode ( $ facilityCode ) { $ result = static :: search ( " facility_code= $ facilityCode " ) ; if ( count ( $ result ) != 1 ) { throw new \ Exception ( " Not exactly one facility found for  $ facilityCode " ) ; } return $ result [ 0 ] ; }
Create a Facility from a Facility Code.
Create a Facility from a Facility Code .