{"id":28560503,"url":"https://github.com/fuel/parser","last_synced_at":"2025-06-10T09:32:39.843Z","repository":{"id":56982688,"uuid":"1624737","full_name":"fuel/parser","owner":"fuel","description":"Fuel PHP Framework - v1.x template parser package adapters","archived":false,"fork":false,"pushed_at":"2024-01-31T18:59:16.000Z","size":310,"stargazers_count":65,"open_issues_count":2,"forks_count":45,"subscribers_count":11,"default_branch":"1.9/develop","last_synced_at":"2024-05-15T12:51:27.169Z","etag":null,"topics":["fuel-v1","php"],"latest_commit_sha":null,"homepage":"http://fuelphp.com","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/fuel.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2011-04-16T23:30:00.000Z","updated_at":"2024-06-18T12:27:14.807Z","dependencies_parsed_at":"2024-06-18T12:27:11.429Z","dependency_job_id":"bf31c936-0983-48b8-b3a1-d937864dbce4","html_url":"https://github.com/fuel/parser","commit_stats":{"total_commits":201,"total_committers":40,"mean_commits":5.025,"dds":0.7014925373134329,"last_synced_commit":"0f258160964f2960dc2edce9f6abafc2233bb9be"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fuel%2Fparser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fuel%2Fparser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fuel%2Fparser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fuel%2Fparser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fuel","download_url":"https://codeload.github.com/fuel/parser/tar.gz/refs/heads/1.9/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fuel%2Fparser/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259047965,"owners_count":22797627,"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":["fuel-v1","php"],"created_at":"2025-06-10T09:30:48.167Z","updated_at":"2025-06-10T09:32:39.829Z","avatar_url":"https://github.com/fuel.png","language":"PHP","readme":"# Parser package\n\n## Installing\n\nSimply add `parser` to your config.php `always_loaded.packages` config option.\n\n## Included Parsers\n\n* Markdown - A PHP version of Markdown by Michel Fortin.\n\n## Usage\n\n```php\n// old usage still valid, will load app/views/example.php\nView::forge('example');\n\n// load a Mustache template, will load and parse app/views/example.mustache\nView::forge('example.mustache');\n\n// load a Twig template, will load and parse app/views/example.twig\nView::forge('example.twig');\n\n// load a Hybrid Haml / Twig template, ATTENTION: this one actually loads app/views/example.twig and {% haml %} code at the top of the view\nView::forge('example.mthaml');\n\n// load a Jade template, will load and parse app/views/example.jade\nView::forge('example.jade');\n\n// load a Plates template, will load and parse app/views/example.plates\nView::forge('example.plates');\n\n// load a Haml template, will load and parse app/views/example.haml\nView::forge('example.haml');\n\n// load a Smarty template, will load and parse app/views/example.smarty\nView::forge('example.smarty');\n\n// load a Lex template, will load and parse app/views/example.lex\nView::forge('example.lex');\n\n// load a Dwoo template, ATTENTION: this one actually loads app/views/example.tpl\nView::forge('example.dwoo');\n\n// load a Handlebars template, will load and parse app/views/example.handlebars\nView::forge('example.handlebars');\n\n// load a Plates template, ATTENTION: this one actually loads app/views/example.tpl\nView::forge('example.plates');\n\n```\n\n## Installing parsers\n\nTo be able to use one of the supported parsers, you need to install them via composer.\nSimply add the libraries to your project's `composer.json` then run `php composer.phar install`:\n\n```json\n{\n    \"require\": {\n        \"dwoo/dwoo\" : \"*\",\n        \"mustache/mustache\" : \"*\",\n        \"smarty/smarty\" : \"*\",\n        \"twig/twig\" : \"2.*\",\n        \"mthaml/mthaml\": \"*\",\n        \"pyrocms/lex\": \"*\",\n        \"league/plates\" : \"3.*\",\n        \"zordius/lightncandy\" : \"dev-master\"\n    }\n}\n```\n\nNote that the  Markdown parser is installed by default, as it is also used by the FuelPHP core class `Markdown`.\n\nLibraries that can not be installed through composer are expected to be installed in in `APPPATH/vendor/lib_name` (capitalize lib_name),\nand you'll have to download them yourself. Don't change the casing or anything, keep it as much original as possible within the `vendor/lib_name`\ndir to keep updating easy (also because some come with their own autoloader).\n\nYou can configure them to be loaded from other locations by copying the parser.php config file to your app and editing it.\n\n## Config and runtime config\n\nCurrently the drivers still lack a lot of config options they should probably accept. They are currently all configured to work with one instance of their parser library, which is available to config:\n\n```php\n// Clear the cache for a specific Smarty template\n$view = View::forge('example.smarty');\n$view-\u003eparser()-\u003eclearCache('example.smarty');\n\n// Example static usage\nView_Smarty::parser()-\u003eclearCache('example.smarty');\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuel%2Fparser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffuel%2Fparser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuel%2Fparser/lists"}