Created
September 28, 2015 13:06
-
-
Save hannesvdvreken/aefb8cdee3da936b5aae to your computer and use it in GitHub Desktop.
Trait with setup method
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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