PHPackages                             joseki/text-as-file-response - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. joseki/text-as-file-response

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

joseki/text-as-file-response
============================

Text as file response extension for Nette Framework

v1.0.0(11y ago)09961[1 PRs](https://github.com/Joseki/TextAsFileResponse/pulls)MITPHP

Since Jul 22Pushed 7y ago2 watchersCompare

[ Source](https://github.com/Joseki/TextAsFileResponse)[ Packagist](https://packagist.org/packages/joseki/text-as-file-response)[ RSS](/packages/joseki-text-as-file-response/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

TextAsFileResponse
==================

[](#textasfileresponse)

[![Build Status](https://camo.githubusercontent.com/c998c20477e7ad0b2237253df24f42c897316a01616d5bf099bd8bb1dcbd5be3/68747470733a2f2f7472617669732d63692e6f72672f4a6f73656b692f54657874417346696c65526573706f6e73652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Joseki/TextAsFileResponse)

Text as file response for Nette Framework

Install
-------

[](#install)

Installation via Composer.

```
{
    "require":{
        "joseki/text-as-file-response": "@dev"
    }
}

```

Download a file from a template
-------------------------------

[](#download-a-file-from-a-template)

```
// in a Presenter
public function actionDownload()
{
    $template = $this->createTemplate();
    $template->setFile("/path/to/template.latte");
    $template->someValue = 123;

    $response = new Joseki\Application\Responses\TextAsFileResponse($template, 'MyFilename.txt');

    $this->sendResponse($response);
}

```

Download a file from a string
-----------------------------

[](#download-a-file-from-a-string)

```
// in a Presenter
public function actionDownload()
{
    $data = 'lorem ipsum...';

    $response = new Joseki\Application\Responses\TextAsFileResponse($data, 'MyFilename.txt');

    $this->sendResponse($response);
}

```

Setting content type
--------------------

[](#setting-content-type)

```
// in a Presenter
public function actionDownload()
{
    $response = new Joseki\Application\Responses\TextAsFileResponse($data, 'MyFilename.xml', 'application/xml');

    $this->sendResponse($response);
}

```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

4319d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1245190?v=4)[Miroslav Paulík](/maintainers/castamir)[@castamir](https://github.com/castamir)

---

Top Contributors

[![castamir](https://avatars.githubusercontent.com/u/1245190?v=4)](https://github.com/castamir "castamir (1 commits)")

### Embed Badge

![Health badge](/badges/joseki-text-as-file-response/health.svg)

```
[![Health](https://phpackages.com/badges/joseki-text-as-file-response/health.svg)](https://phpackages.com/packages/joseki-text-as-file-response)
```

###  Alternatives

[nette/code-checker

✅ Nette CodeChecker: A simple tool to check source code against a set of Nette coding standards.

881.7M6](/packages/nette-code-checker)[contributte/menu-control

Menu control for Nette framework

29108.6k1](/packages/contributte-menu-control)[carrooi/nette-menu

Menu control for Nette framework

2950.0k1](/packages/carrooi-nette-menu)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
