Ejemplo n.º 1
0
 /**
  * Creates a new project attachment
  */
 public function __construct()
 {
     parent::__construct();
     $this->setType("ProjectAttachment");
 }
Ejemplo n.º 2
0
 /**
  * Replaces the current image with a new image.
  * 
  * Automatically converts from one format to PNG,
  * which is the default when dealing with images
  * on the platform.
  * 
  * @param string $path	The path to the original image
  */
 public function replace($path)
 {
     parent::replace($path);
     CachedImage::invalidate($this);
 }
Ejemplo n.º 3
0
 /**
  * Replaces the file with a given temporary file.
  *
  * Additionally checks if the attachment is an image and flags the attachment as such.
  *
  * @param string $id The temporary id (prefixed with TMP:)
  */
 public function replaceFromTemporaryFile($id)
 {
     parent::replaceFromTemporaryFile($id);
     $this->isImage = $this->canImagickParseImage();
 }
Ejemplo n.º 4
0
 /**
  * Creates a new footprint attachment
  */
 public function __construct()
 {
     parent::__construct();
     $this->setType("FootprintAttachment");
 }