getCacheDir() публичный Метод

public getCacheDir ( ) : string
Результат string
Пример #1
0
 /**
  * Creates a temp folder and returns its path.
  * Please use TempFile::createFolder() class instead.
  *
  * @param  string $prefix
  * @param  bool $fullPath Returns the full path on true and the relative to the current TempFolder on false.
  *
  * @return string Path with trailing slash
  */
 public function createTempFolder($prefix = '', $fullPath = true)
 {
     $tmp = $this->jarves->getCacheDir();
     do {
         $path = $tmp . $prefix . dechex(time() / mt_rand(100, 500));
     } while (is_dir($path));
     mkdir($path);
     if ('/' !== substr($path, -1)) {
         $path .= '/';
     }
     return $fullPath ? $path : substr($path, strlen($tmp));
 }
Пример #2
0
 /**
  * @return Composer
  */
 private function getComposer()
 {
     putenv('COMPOSER_HOME=./');
     putenv('COMPOSER_CACHE_DIR=' . $this->jarves->getCacheDir());
     $this->composerIO = new BufferIO();
     $this->composer = Factory::create($this->composerIO);
     return $this->composer;
 }