protected function saveToFile($data, $filePath)
    {
        $fileContent = "<?php\nreturn " . VarDumper::export($data) . ";\n";
        $self = $this;
        return Reaction\Helpers\FileHelperAsc::putContents($filePath, $fileContent, 'cwt')->then(
            function() use ($self, $filePath) {
                $self->invalidateScriptCache($filePath);
            }
        );
    }
protected function saveToFile($data, $filePath)
    {
        $fileContent = "<?php\nreturn " . VarDumper::export($data) . ";\n";
        $self = $this;
        return Reaction\Helpers\FileHelperAsc::putContents($filePath, $fileContent, 'cwt')->then(
            function() use ($self, $filePath) {
                $self->invalidateScriptCache($filePath);
            }
        );
    }
protected function saveToFile ( $ data , $ filePath ) { $ fileContent = "<?php\nreturn " . VarDumper :: export ( $ data ) . ";\n" ; $ self = $ this ; return Reaction \ Helpers \ FileHelperAsc :: putContents ( $ filePath , $ fileContent , 'cwt' ) -> then ( function ( ) use ( $ self , $ filePath ) { $ self -> invalidateScriptCache ( $ filePath ) ; } ) ; }
Saves the authorization data to a PHP script file.

@param array  $data the authorization data
@param string $filePath the file path.
@see loadFromFile()
@return ExtendedPromiseInterface
Saves the authorization data to a PHP script file .