src/Listeners/Renderer/Debug/AbstractDebugRenderer.php
/**
     * Writes the passed data to the also passed filename.
     *
     * @param string $data     The data to write
     * @param string $filename The name of the file to write the data to
     *
     * @return void
     *
     * @throws \Exception Is thrown if the file can not be written
     */
Writes the passed data to the also passed filename.
@param string $data     The data to write
@param string $filename The name of the file to write the data to

@return void

@throws \Exception Is thrown if the file can not be written
Writes the passed data to the also passed filename . @param string $data The data to write @param string $filename The name of the file to write the data to @return void @throws \ Exception Is thrown if the file can not be written
protected function write(string $data, string $filename) : void
    {
        if (is_file($filename)) {
            return;
        }
        if (file_put_contents($filename, $data)) {
            $this->getSystemLogger()->debug(sprintf('Successfully written file %s', $filename));
        } else {
            throw new \Exception(sprintf('Can\'t write debug artefact "%s"', $filename));
        }
        $this->getRegistryProcessor()->mergeAttributesRecursive(
            RegistryKeys::STATUS,
            array(
                RegistryKeys::FILES => array(
                    $filename => array(
                        Uuid::uuid4()->toString() => array(
                            RegistryKeys::STATUS => 1,
                            RegistryKeys::SKIPPED_ROWS => 0,
                            RegistryKeys::PROCESSED_ROWS => 0
                        )
                    )
                )
            )
        );
    }
protected function write ( string $ data , string $ filename ) : void { if ( is_file ( $ filename ) ) { return ; } if ( file_put_contents ( $ filename , $ data ) ) { $ this -> getSystemLogger ( ) -> debug ( sprintf ( 'Successfully written file %s' , $ filename ) ) ; } else { throw new \ Exception ( sprintf ( 'Can\'t write debug artefact "%s"' , $ filename ) ) ; } $ this -> getRegistryProcessor ( ) -> mergeAttributesRecursive ( RegistryKeys :: STATUS , array ( RegistryKeys :: FILES => array ( $ filename => array ( Uuid :: uuid4 ( ) -> toString ( ) => array ( RegistryKeys :: STATUS => 1 , RegistryKeys :: SKIPPED_ROWS => 0 , RegistryKeys :: PROCESSED_ROWS => 0 ) ) ) ) ) ; }
Writes the passed data to the also passed filename.
Writes the passed data to the also passed filename .
// do not override the original files, if available // write the data to the file with the passed name // update the status