Beispiel #1
0
 /**
  * Get / Set the source. Automatically set the source_type
  *
  * @param  mixed $source
  * @return mixed
  */
 public function source($source = NULL)
 {
     if ($source !== NULL) {
         $this->_source = Upload_Source::factory($source);
         if ($this->_source->type() === Upload_Source::TYPE_TEMP) {
             $this->temp()->directory(dirname($source));
             $this->filename(basename($source));
         }
         return $this;
     }
     return $this->_source;
 }