{"id":36971871,"url":"https://github.com/esase/tiny-view","last_synced_at":"2026-01-13T21:54:48.950Z","repository":{"id":56979135,"uuid":"288694374","full_name":"esase/tiny-view","owner":"esase","description":"The simple template engine for representation of your html code.","archived":false,"fork":false,"pushed_at":"2020-11-22T10:28:42.000Z","size":31,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-27T14:56:09.485Z","etag":null,"topics":["esase","framework","html","layout","lightweight","microservices","renderer","templateengine","tinyframework","view"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/esase.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-19T09:50:50.000Z","updated_at":"2020-11-22T10:28:44.000Z","dependencies_parsed_at":"2022-08-21T11:50:33.729Z","dependency_job_id":null,"html_url":"https://github.com/esase/tiny-view","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/esase/tiny-view","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esase%2Ftiny-view","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esase%2Ftiny-view/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esase%2Ftiny-view/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esase%2Ftiny-view/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/esase","download_url":"https://codeload.github.com/esase/tiny-view/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esase%2Ftiny-view/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28401945,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T14:36:09.778Z","status":"ssl_error","status_checked_at":"2026-01-13T14:35:19.697Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["esase","framework","html","layout","lightweight","microservices","renderer","templateengine","tinyframework","view"],"created_at":"2026-01-13T21:54:48.285Z","updated_at":"2026-01-13T21:54:48.944Z","avatar_url":"https://github.com/esase.png","language":"PHP","readme":"# tiny-view\n\n[![Build Status](https://travis-ci.com/esase/tiny-view.svg?branch=master)](https://travis-ci.com/github/esase/tiny-view/builds)\n[![Coverage Status](https://coveralls.io/repos/github/esase/tiny-view/badge.svg?branch=master)](https://coveralls.io/github/esase/tiny-view?branch=master)\n\n**Tiny/View** separates your business logic from its representation, it means you can store your `view` as a list of \nseparated `.phtml` files and pass there you data keeping you controllers clean.\n\nThe package is very small and fast due to using native `php` inside templates and layouts, yes we don't use\nany extra markup language, it's only relies on the php's [alternative syntax](https://www.php.net/control-structures.alternative-syntax)\n\nThere are only two main entities: `templates` and `layouts`.\n\n`Templates` are used for displaying small peaces of information like list of users, a login form, etc. And the `layouts` which \nwork as wrappers for those templates. For instance you can have several layouts with already included `css` and `js` files and \nIt makes you life easier because you don't need to specify any `js` and `css` files for every template.\n\n## Template\n\n```php\n\u003c?php\n\n    use Tiny\\View\\View;\n\n    // we are going to show the user list\n    $view = new View(['users' =\u003e [ // an array of users\n            ['id' =\u003e 1, 'name' =\u003e 'Tester1'],\n            ['id' =\u003e 2, 'name' =\u003e 'Tester2']\n        ]],\n        './users.phtml', // a template for the data,\n        './layout/base.phtml' // a layout it's optional \n    );\n\n    // render the template using passed variables and wrap its content to a layout\n    echo $view;\n\n```\n\n```html\n\u003cul\u003e\n    \u003c?php foreach ($this-\u003eusers as $user): ?\u003e\n        \u003cli\u003e\n            \u003cb\u003e\u003c?= $this-\u003eid ?\u003e\u003c/b\u003e: \u003c?= $this-\u003ename ?\u003e\n        \u003c/li\u003e\n    \u003c?php endforeach ?\u003e\n\u003c/ul\u003e\n```\n\n## Layout\n\n```html\n    \u003c!DOCTYPE html\u003e\n    \u003chtml lang=\"en\"\u003e\n        \u003chead\u003e\n            \u003cmeta charset=\"utf-8\"\u003e\n            \u003ctitle\u003eMy test site\u003c/title\u003e\n        \u003c/head\u003e\n        \u003cbody\u003e\n            \u003cdiv class=\"container\"\u003e\n                \u003c!-- inject generated data from templates --\u003e\n                \u003c?= $this-\u003econtent ?\u003e\n            \u003c/div\u003e\n        \u003c/body\u003e\n    \u003c/html\u003e\n```\n\n## View helpers\n\nWhen it's not enough a pre built functionality or it might be not convenient way to work with templates \nyou can register you own list of helpers (small functions) which will do exactly you want. Please read more information in the documentation\n\n\n## Installation\n\nRun the following to install this library:\n\n```bash\n$ composer require esase/tiny-view\n```\n\n## Documentation\n\nhttps://tiny-docs.readthedocs.io/en/latest/tiny-view/docs/index.html\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fesase%2Ftiny-view","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fesase%2Ftiny-view","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fesase%2Ftiny-view/lists"}