示例#1
0
 /**
  * Constructor.
  *
  * @param string       $newFileName  new file name
  * @param string       $fileName     current file name
  * @param string       $folder       current file folder
  * @param ResourceType $resourceType current file resource type
  * @param CKFinder     $app          CKFinder app
  */
 public function __construct($newFileName, $fileName, $folder, ResourceType $resourceType, CKFinder $app)
 {
     parent::__construct($fileName, $folder, $resourceType, $app);
     $this->newFileName = static::secureName($newFileName, $this->config->get('disallowUnsafeCharacters'));
     if ($this->config->get('checkDoubleExtension')) {
         $this->newFileName = Utils::replaceDisallowedExtensions($this->newFileName, $resourceType);
     }
 }
示例#2
0
文件: CopiedFile.php 项目: vobinh/PHP
 /**
  * @copydoc File::autorename()
  */
 public function autorename(Backend $backend = null, $path = '')
 {
     return parent::autorename($this->targetFolder->getBackend(), $this->targetFolder->getPath());
 }
示例#3
0
 /**
  * Constructor
  *
  * @param string        $fileName
  * @param CKFinder      $app
  */
 public function __construct($fileName, CKFinder $app)
 {
     $this->workingFolder = $app['working_folder'];
     parent::__construct($fileName, $this->workingFolder->getClientCurrentFolder(), $this->workingFolder->getResourceType(), $app);
 }
示例#4
0
 public function setContents($contents, $filePath = null)
 {
     return parent::setContents($contents, $this->newFileName ? Path::combine($this->getPath(), $this->newFileName) : null);
 }
 /**
  * @param string       $newFileName  new file name
  * @param string       $fileName     current file name
  * @param string       $folder       current file folder
  * @param ResourceType $resourceType current file resource type
  * @param CKFinder     $app          CKFinder app
  */
 public function __construct($newFileName, $fileName, $folder, ResourceType $resourceType, CKFinder $app)
 {
     $this->newFileName = $newFileName;
     parent::__construct($fileName, $folder, $resourceType, $app);
 }