protected function loadDefaultFilters()
    {
        if ($this->_filters) {
            return $this->_filters;
        }

        $cacheId = __CLASS__ . '_' . __FUNCTION__;

        $output = $this->cache->load($cacheId);
        if ($output) {
            foreach ($output as $key => $filterObject) {
                // Filterobjects should not serialize anything loaded from a source
                if ($filterObject instanceof \MUtil_Registry_TargetInterface) {
                    $this->applySource($filterObject);
                }
                $this->_filters[$key] = $filterObject;
            }
            return $this->_filters;
        }

        $this->_filters = $this->getFilters("SELECT *
                FROM gems__appointment_filters INNER JOIN
                    gems__track_appointments ON gaf_id = gtap_filter_id INNER JOIN
                    gems__tracks ON gtap_id_track = gtr_id_track
                WHERE gaf_active = 1 AND gtr_active = 1 AND gtr_date_start <= CURRENT_DATE AND
                    (gtr_date_until IS NULL OR gtr_date_until >= CURRENT_DATE)
                ORDER BY gaf_id_order, gtap_id_order");

        $this->cache->save($this->_filters, $cacheId, array('appointment_filters', 'tracks'));

        return $this->_filters;
    }
protected function loadDefaultFilters()
    {
        if ($this->_filters) {
            return $this->_filters;
        }

        $cacheId = __CLASS__ . '_' . __FUNCTION__;

        $output = $this->cache->load($cacheId);
        if ($output) {
            foreach ($output as $key => $filterObject) {
                // Filterobjects should not serialize anything loaded from a source
                if ($filterObject instanceof \MUtil_Registry_TargetInterface) {
                    $this->applySource($filterObject);
                }
                $this->_filters[$key] = $filterObject;
            }
            return $this->_filters;
        }

        $this->_filters = $this->getFilters("SELECT *
                FROM gems__appointment_filters INNER JOIN
                    gems__track_appointments ON gaf_id = gtap_filter_id INNER JOIN
                    gems__tracks ON gtap_id_track = gtr_id_track
                WHERE gaf_active = 1 AND gtr_active = 1 AND gtr_date_start <= CURRENT_DATE AND
                    (gtr_date_until IS NULL OR gtr_date_until >= CURRENT_DATE)
                ORDER BY gaf_id_order, gtap_id_order");

        $this->cache->save($this->_filters, $cacheId, array('appointment_filters', 'tracks'));

        return $this->_filters;
    }
protected function loadDefaultFilters ( ) { if ( $ this -> _filters ) { return $ this -> _filters ; } $ cacheId = __CLASS__ . '_' . __FUNCTION__ ; $ output = $ this -> cache -> load ( $ cacheId ) ; if ( $ output ) { foreach ( $ output as $ key => $ filterObject ) { // Filterobjects should not serialize anything loaded from a source if ( $ filterObject instanceof \ MUtil_Registry_TargetInterface ) { $ this -> applySource ( $ filterObject ) ; } $ this -> _filters [ $ key ] = $ filterObject ; } return $ this -> _filters ; } $ this -> _filters = $ this -> getFilters ( "SELECT *
                FROM gems__appointment_filters INNER JOIN
                    gems__track_appointments ON gaf_id = gtap_filter_id INNER JOIN
                    gems__tracks ON gtap_id_track = gtr_id_track
                WHERE gaf_active = 1 AND gtr_active = 1 AND gtr_date_start <= CURRENT_DATE AND
                    (gtr_date_until IS NULL OR gtr_date_until >= CURRENT_DATE)
                ORDER BY gaf_id_order, gtap_id_order" ) ; $ this -> cache -> save ( $ this -> _filters , $ cacheId , array ( 'appointment_filters' , 'tracks' ) ) ; return $ this -> _filters ; }
Load the filters from cache or elsewhere

@return AppointmentFilterInterface[]
Load the filters from cache or elsewhere