{"id":16673922,"url":"https://github.com/sensorario/engine","last_synced_at":"2026-04-29T03:34:44.441Z","repository":{"id":145917191,"uuid":"537656675","full_name":"sensorario/engine","owner":"sensorario","description":"A template engine","archived":false,"fork":false,"pushed_at":"2023-06-06T03:02:15.000Z","size":105,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-19T19:45:41.477Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sensorario.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-17T00:23:49.000Z","updated_at":"2023-03-20T16:00:09.000Z","dependencies_parsed_at":"2025-01-19T19:39:30.599Z","dependency_job_id":"faca727b-e377-4dcf-9132-472963fb95c3","html_url":"https://github.com/sensorario/engine","commit_stats":null,"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sensorario%2Fengine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sensorario%2Fengine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sensorario%2Fengine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sensorario%2Fengine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sensorario","download_url":"https://codeload.github.com/sensorario/engine/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243326579,"owners_count":20273507,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-10-12T12:28:44.325Z","updated_at":"2025-12-30T04:32:44.012Z","avatar_url":"https://github.com/sensorario.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Engine\n\nThis is a php engine. Made just to play. Learn. And becouse I simply love code. Please do not use this in production. It works. It is tested. But I am using it just to make some videos about open source or just for training.\n\n[TOC]\n\n## Components\n\n - [Engine](/src/Engine/) - the engine\n - [Form](/src/Engine/Ui/Form) - forms\n - [Grid](/src/Engine/Ui/Grid) - grid\n - [View](/src/Engine/Ui/View) - search items\n\n## Installation\n\n```\ncomposer install sensorario/engine\n```\n\n### Usage\n\n```\nrequire __DIR__ . '/vendor/autoload.php';\nuse Sensorario\\Engine\\EngineFactory;\n$engine = (new EngineFactory)-\u003egetEngine();\n$engine-\u003erender('template', $model);\n```\n\n### Foreach\n\n```\n\u003cul\u003e\n    {% foreach items as item %}\n    \u003cli\u003e{{item.id}}\u003c/li\u003e\n    {% endforeach %}\n\u003c/ul\u003e\n```\n\n### If statement\n\n```\n{% if foo.bar is 42 %}\n{% endif %}\n```\n\n## UI\n\nThis engine provides few UI items. A Grid, paginated. A Form.\n\n### View\n\n```\n{{View:{\n    \"model\": {\n        \"title\":\"Ricerca\"\n    }\n}}}View\n```\n    \n### Form\n\n```\n{{Form:{\n    \"form\": {\n        \"method\": \"POST\",\n        \"action\": \"cippalippa\"\n    },\n    \"fields\": [\n        { \"name\" : \"name\" },\n        { \"name\" : \"surname\" },\n        { \"name\" : \"ciaone\" },\n        { \"name\" : \"dob\" }\n    ]\n}}}Form\n```\n    \n### Grid\n\n``` \n{{Grid:{\n    \"source\":{\n        \"repository\":\"Sensorario.Engine.ExampleRepo\",\n        \"resource\":\"\",\n        \"itemPerPage\":\"2\"\n    },\n    \"model\":{\n        \"title\":\"Griglia\",\n        \"headers\": [\n            { \"type\" : \"text\" , \"field\" : \"name\", \"name\" : \"NOME\" },\n            { \"type\" : \"text\" , \"field\" : \"surname\", \"name\" : \"COGNOME\" }\n        ],\n        \"rowIdentifier\":\"id\"\n    }\n}}}Grid\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsensorario%2Fengine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsensorario%2Fengine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsensorario%2Fengine/lists"}