Esempio n. 1
0
 /**
  * @param string $filename
  */
 public function setFilename($filename)
 {
     // it is a filename prefix, not a suffix for the download path
     if (strpos($filename, 'tmp/') !== 0) {
         $filename = 'tmp/' . date('Ymd') . '/' . $filename;
     }
     parent::setFilename($filename);
 }
Esempio n. 2
0
 /**
  * @return string
  */
 public function getDownloadPath()
 {
     return parent::getDownloadPath() . '/plugin/' . $this->getName();
 }
Esempio n. 3
0
 public function testGetWebPath()
 {
     $this->assertEmpty($this->entity->getWebPath());
     $this->entity->setFilename('foo');
     $this->assertEquals('/media/foo', $this->entity->getWebPath());
 }
Esempio n. 4
0
 /**
  * @param string $filename
  *
  * @return Item
  */
 public function setFilename($filename)
 {
     $this->cover = $filename;
     parent::setFilename($filename);
     return $this;
 }