public final function __construct($linkId) { if ($linkId) { $this->linkId = $linkId; } $config = StorageConfig::me()->getConfig(StorageEngineType::getByClass(get_class($this)), $this->linkId); $this->parseConfig($config); if (isset($config['keepFiles']) && $config['keepFiles']) { $this->keepFiles = true; } if (isset($config['retries']) && $config['retries'] > 1) { $this->retries = $config['retries']; } if (isset($config['timeout'])) { $this->timeout = $config['timeout']; } if (isset($config['httpTimeout'])) { $this->httpTimeout = $config['httpTimeout']; } }
public function getPath() { if ($this->getBaseStorageEngineTypeId() != StorageEngineType::LOCAL) { throw new WrongStateException(); } $config = StorageConfig::me()->getConfig(StorageEngineType::create($this->getBaseStorageEngineTypeId()), $this->getBaseStorageEngineConfig()); $path = realpath($config['path'] . DIRECTORY_SEPARATOR . $this->getFileName()); return $path; }