Created
May 23, 2012 02:44
-
-
Save colindecarlo/2772976 to your computer and use it in GitHub Desktop.
protected _persist method in Persister subclass File
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
<?php | |
// interesting bits | |
protected function _persist() | |
{ | |
$this->_location = tempnam(sys_get_temp_dir(), 'UL-'); | |
if (!$this->_moveUploadedFile()) { | |
unlink($this->_location); | |
$this->_location = null; | |
throw new \Exception('error moving uploaded file'); | |
} | |
} | |
// interesting bits |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment