src/Vatsimphp/Sync/AbstractSync.php
protected function loadFromCache()
    {
        $this->log->debug("Load from cache file {$this->filePath}");
        $data = $this->getDataFromFile();
        if ($data === false) {
            $data = '';
        }

        // validate data through parser
        if (!$this->isDataValid($data)) {
            $this->addError($this->filePath, 'Data not valid according to parser');

            return false;
        }

        // verify if local cache is expired
        if ($this->isCacheExpired()) {
            $this->addError($this->filePath, 'Local cache is expired');

            return false;
        }

        return true;
    }
protected function loadFromCache()
    {
        $this->log->debug("Load from cache file {$this->filePath}");
        $data = $this->getDataFromFile();
        if ($data === false) {
            $data = '';
        }

        // validate data through parser
        if (!$this->isDataValid($data)) {
            $this->addError($this->filePath, 'Data not valid according to parser');

            return false;
        }

        // verify if local cache is expired
        if ($this->isCacheExpired()) {
            $this->addError($this->filePath, 'Local cache is expired');

            return false;
        }

        return true;
    }
protected function loadFromCache ( ) { $ this -> log -> debug ( "Load from cache file {$this->filePath}" ) ; $ data = $ this -> getDataFromFile ( ) ; if ( $ data === false ) { $ data = '' ; } // validate data through parser if ( ! $ this -> isDataValid ( $ data ) ) { $ this -> addError ( $ this -> filePath , 'Data not valid according to parser' ) ; return false ; } // verify if local cache is expired if ( $ this -> isCacheExpired ( ) ) { $ this -> addError ( $ this -> filePath , 'Local cache is expired' ) ; return false ; } return true ; }
Load data from file and pass it to the parser
Fails if content is expired.

@return bool
Load data from file and pass it to the parser Fails if content is expired .