Skip to content

Instantly share code, notes, and snippets.

@hannesvdvreken
Created September 28, 2015 13:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hannesvdvreken/aefb8cdee3da936b5aae to your computer and use it in GitHub Desktop.
Save hannesvdvreken/aefb8cdee3da936b5aae to your computer and use it in GitHub Desktop.
Trait with setup method
trait CsvWriter
{
private $file;
private $writer;
private function setup()
{
$this->file = new SplTempFileObject();
$this->writer = Writer::createFromFileObject($this->file);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment