for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Sludio\HelperBundle\Sitemap\Dumper;
trait FileDumperTrait
{
protected $filename = null;
protected $handle = null;
/**
* Constructor.
*
* @param string $filename The filename. Must be acessible in write mode.
*/
public function __construct($filename)
$this->filename = $filename;
}
* {@inheritdoc}
public function getFilename()
return $this->filename;
public function setFilename($filename)
$this->clearHandle();
public function clearHandle()
if ($this->handle !== null) {
fclose($this->handle);
$this->handle = null;
public function __destruct()