/** * 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); } }
/** * @copydoc File::autorename() */ public function autorename(Backend $backend = null, $path = '') { return parent::autorename($this->targetFolder->getBackend(), $this->targetFolder->getPath()); }
/** * 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); }
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); }