getUploadTemp() public static method

Static method to return the upload temp directory.
public static getUploadTemp ( ) : string
return string
示例#1
0
 public function testGetUploadTemp()
 {
     $this->assertNotNull(Dir::getUploadTemp());
     $this->assertContains(DIRECTORY_SEPARATOR, Dir::getUploadTemp());
 }
示例#2
0
 /**
  * Method to convert the image.
  *
  * @return void
  */
 protected function convertImage()
 {
     // Define the temp converted image.
     $this->convertedImage = \Pop\File\Dir::getUploadTemp() . DIRECTORY_SEPARATOR . $this->img->getFilename() . '_' . time() . '.png';
     // Convert the GIF to PNG, save and clear the output buffer.
     $this->img->convert('png')->save($this->convertedImage);
     // Re-instantiate the newly converted image object and re-read the image data.
     $this->img = new Gd($this->convertedImage);
     $this->imageData = $this->img->read();
 }