{"id":16756895,"url":"https://github.com/hexmakina/kadro","last_synced_at":"2026-01-15T22:28:11.251Z","repository":{"id":48393450,"uuid":"367565860","full_name":"HexMakina/kadro","owner":"HexMakina","description":"framework for building web application","archived":false,"fork":false,"pushed_at":"2024-03-21T15:06:05.000Z","size":462,"stargazers_count":0,"open_issues_count":24,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-03-21T16:30:01.134Z","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/HexMakina.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}},"created_at":"2021-05-15T07:16:17.000Z","updated_at":"2024-04-15T10:44:26.168Z","dependencies_parsed_at":"2023-01-24T17:00:25.096Z","dependency_job_id":"42061dee-ee97-4e48-b49d-d89b12f5bfdd","html_url":"https://github.com/HexMakina/kadro","commit_stats":{"total_commits":355,"total_committers":2,"mean_commits":177.5,"dds":"0.17183098591549295","last_synced_commit":"40ced4551a09c504f7f8602f5435939934febb0a"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HexMakina%2Fkadro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HexMakina%2Fkadro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HexMakina%2Fkadro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HexMakina%2Fkadro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HexMakina","download_url":"https://codeload.github.com/HexMakina/kadro/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246911467,"owners_count":20853657,"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-13T03:42:22.563Z","updated_at":"2026-01-15T22:28:11.222Z","avatar_url":"https://github.com/HexMakina.png","language":"PHP","readme":"[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/HexMakina/kadro/badges/quality-score.png?b=main)](https://scrutinizer-ci.com/g/HexMakina/kadro/?branch=main)\n\u003cimg src=\"https://img.shields.io/badge/PHP-7.4-brightgreen\" alt=\"PHP 7.4 Required\" /\u003e\n\u003cimg src=\"https://img.shields.io/badge/PSR-3-brightgreen\" alt=\"PSR-3 Compliant\" /\u003e\n\u003cimg src=\"https://img.shields.io/badge/PSR-4-brightgreen\" alt=\"PSR-4 Compliant\" /\u003e\n\u003cimg src=\"https://img.shields.io/badge/PSR-11-brightgreen\" alt=\"PSR-11 Compliant\" /\u003e\n\u003cimg src=\"https://img.shields.io/badge/PSR-12-brightgreen\" alt=\"PSR-12 Compliant\" /\u003e\n[![License](http://poser.pugx.org/hexmakina/kadro/license)](https://packagist.org/packages/hexmakina/kadro)\n[![Latest Stable Version](http://poser.pugx.org/hexmakina/kadro/v)](https://packagist.org/packages/hexmakina/kadro)\n# kadro\nPHP MVC framework for building web applications\n\n# install \n`composer require hexmakina/kadro`\n\nthen run `vendor/hexmakina/kadro/install.php` to initialise the application with base tables and data\n\nfor instance: \n\n`php vendor/hexmakina/kadro/install.php -db DATABASE_NAME -u DATABASE_USER -p DATABASE_PASSWORD`\n\nor, if the password contains a blank space\n\n`php vendor/hexmakina/kadro/install.php -db DATABASE_NAME -u DATABASE_USER -p \"DATABASE_PASSWORD\"`\n\nit creates a default root user \"root\" with password \"root\"\n\n## 1. Auth\n### Operator\n### Permission\n### ACL\n\n## 2. Models\n### PSR-3 Logger\n### PSR-4 Autoloader\n\n## 3. Views\n\n## 4. Controllers\n### Base\n### Displays\n### Kadro\n### ORM\n### Reception\n\n### Router\n### Chainlings \u0026 Traitor\n### Container (PSR-11 )\n### Errors\n\n\nBase\n- Routing\n- Container \u0026 Invoker\n- Logger \u0026 Errors\n\n\n- Hopper\n- LeMarchand\n- Traitor\n- LogLaddy\n\nhandles errors, routing, logging \u0026 container\n\n#### Execution \u0026 Return\nto properly execute a controller method, f.i. `public function doSomething()`, a call is to be made: `$controller-\u003eexecute('doSomething')`, allowing for hooks to be executed as well.\n\nThe return value of `doSomething()` will be returned, if no errors occured during the Hooks and Traitor part.\n\n#### Hooks\nwhen running `$controller-\u003eexecute('doSomething')` , the following hooks will be called:\n```\n$this-\u003eprepare()\n$this-\u003ebefore_doSomething()\n$this-\u003edoSomething()\n$this-\u003eafter_doSomething()\n$this-\u003econclude()\n```\n\nthere is no need to implement any of the calls as Base will check for their existence first\nregarding prepare() and conclude(), Base has a default implementation returning true  \n\n#### Traitor\nBase uses the [Traitor](https://github.com/HexMakina/Traitor) trait, and calls the controller's trait-compatible methods before the controller's own methods.\n\nGiven a controller using Trait1 and Trait2, the method call list will be the following:\n```\n$this-\u003eTrait1_Traitor_prepare()\n$this-\u003eTrait2_Traitor_prepare()\n$this-\u003eprepare()\n\n$this-\u003eTrait1_Traitor_before_doSomething()\n$this-\u003eTrait2_Traitor_before_doSomething()\n$this-\u003ebefore_doSomething()\n\n$this-\u003eTrait1_Traitor_doSomething()\n$this-\u003eTrait2_Traitor_doSomething()\n$this-\u003edoSomething()\n\n$this-\u003eTrait1_Traitor_after_doSomething()\n$this-\u003eTrait2_Traitor_after_doSomething()\n$this-\u003eafter_doSomething()\n\n$this-\u003eTrait1_Traitor_conclude()\n$this-\u003eTrait2_Traitor_conclude()\n$this-\u003econclude()\n```\n\n## 5. Routing\n\nkadro requires a 'home' route:\n- GET ''\n\nkadro reserves the following routes\n```\nreturn [\n  // --- auth\n  ['GET', 'checkin', 'Reception::checkin', 'checkin'],\n  ['GET', 'checkout', 'Reception::checkout', 'checkout'],\n  ['POST', 'identify', 'Reception::identify', 'identify'],\n  ['GET', 'operator/[*:username]/toggle/active', 'Operator::change_active', 'operator_change_active'],\n  ['GET', 'operator/[*:username]/change-acl/[i:permission_id]', 'Operator::change_acl', 'acl_toggle'],\n\n  // --- TRADUKO\n  ['POST', 'traduko/update_file', 'Traduko::update_file', 'traduko_update_file'],\n\n  // --- LOCALE JSON\n  ['GET', 'locale/language_codes.[a:format]', 'Export::otto_languages', 'otto_languages'],\n\n  // --- EXPORT\n  ['GET', 'export', 'Export::dashboard', 'export'], // default ExportController is dashboard\n  ['GET', 'otto/language_codes.[a:format]/term/[a:search]?', 'Export::otto_languages', 'otto_languages_search'],\n  ['GET', 'otto/[a:model]/distinct/[*:field].[a:format]', 'Export::otto_distinct_field', 'otto_distinct_field'],\n  ['GET', 'otto/[a:model]/distinct/[*:field].[a:format]/term/[*:search]?', 'Export::otto_distinct_field', 'otto_distinct_field_where'],\n  ['GET', 'export/[*:action].[a:format]', 'Export::dynamic_action_call', 'export_action_call'],\n];\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhexmakina%2Fkadro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhexmakina%2Fkadro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhexmakina%2Fkadro/lists"}