src/TempFileCache.php
private function getTempDir($directory)
    {
        if (empty($directory) || !is_string($directory)) {
            $classParts = explode("\\", get_called_class());
            return sys_get_temp_dir()  . '/' . end($classParts);
        } elseif (strpos($directory, '/') !== 0) {
            return sys_get_temp_dir() . '/' . $directory;
        } else {
            return $directory;
        }
    }
private function getTempDir($directory)
    {
        if (empty($directory) || !is_string($directory)) {
            $classParts = explode("\\", get_called_class());
            return sys_get_temp_dir()  . '/' . end($classParts);
        } elseif (strpos($directory, '/') !== 0) {
            return sys_get_temp_dir() . '/' . $directory;
        } else {
            return $directory;
        }
    }
private function getTempDir ( $ directory ) { if ( empty ( $ directory ) || ! is_string ( $ directory ) ) { $ classParts = explode ( "\\" , get_called_class ( ) ) ; return sys_get_temp_dir ( ) . '/' . end ( $ classParts ) ; } elseif ( strpos ( $ directory , '/' ) !== 0 ) { return sys_get_temp_dir ( ) . '/' . $ directory ; } else { return $ directory ; } }
Generate a consistent temporary directory based on a requested directory name.

@param string $directory The name or path of a temporary directory.
@return string The directory name, resolved to a full path.
Generate a consistent temporary directory based on a requested directory name .