private function save($access_token, $time)
    {
        unset($this->runtime_file_content);

        $bytes = @file_put_contents($this->getFilePath(), json_encode(['a' => $access_token, 'e' => $time]));

        if ($bytes === false) {
            // fatal log will throw an exception
            $this->logger->fatal(__CLASS__, 'store', sprintf('Unable to store access token in %s', $this->getFilePath()));
        }

        $this->logger->debug(__CLASS__, 'store', sprintf('Access token stored in %s', $this->getFilePath()));

        return true;
    }
private function save($access_token, $time)
    {
        unset($this->runtime_file_content);

        $bytes = @file_put_contents($this->getFilePath(), json_encode(['a' => $access_token, 'e' => $time]));

        if ($bytes === false) {
            // fatal log will throw an exception
            $this->logger->fatal(__CLASS__, 'store', sprintf('Unable to store access token in %s', $this->getFilePath()));
        }

        $this->logger->debug(__CLASS__, 'store', sprintf('Access token stored in %s', $this->getFilePath()));

        return true;
    }
private function save ( $ access_token , $ time ) { unset ( $ this -> runtime_file_content ) ; $ bytes = @ file_put_contents ( $ this -> getFilePath ( ) , json_encode ( [ 'a' => $ access_token , 'e' => $ time ] ) ) ; if ( $ bytes === false ) { // fatal log will throw an exception $ this -> logger -> fatal ( __CLASS__ , 'store' , sprintf ( 'Unable to store access token in %s' , $ this -> getFilePath ( ) ) ) ; } $ this -> logger -> debug ( __CLASS__ , 'store' , sprintf ( 'Access token stored in %s' , $ this -> getFilePath ( ) ) ) ; return true ; }
Save AT and timestamp in file

@param string $access_token
@param int $timestamp

@return bool
Save AT and timestamp in file