public function __construct($prefix = 'tmp', $base = '', $includeRandomPart = true) { if (empty($base)) { $base = sys_get_temp_dir(); } if ($includeRandomPart) { $random = static::randomString(); $prefix = "{$prefix}_{$random}"; } parent::__construct(["{$base}/{$prefix}"]); }
/** * @param string $prefix * @param string $base * @param bool $includeRandomPart */ public function __construct($prefix = 'tmp', $base = '', $includeRandomPart = true) { if (empty($base)) { $base = sys_get_temp_dir(); } $path = "{$base}/{$prefix}"; if ($includeRandomPart) { $path = static::randomLocation($path); } parent::__construct(["{$path}"]); }
public function __construct($dirs) { parent::__construct($dirs); $this->parentDir = getcwd(); }