{"id":19460609,"url":"https://github.com/bjarneo/q","last_synced_at":"2026-05-15T17:06:15.637Z","repository":{"id":12071306,"uuid":"14658472","full_name":"bjarneo/Q","owner":"bjarneo","description":"Q PHP Framework ","archived":false,"fork":false,"pushed_at":"2014-01-07T18:35:45.000Z","size":440,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-17T17:03:33.229Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bjarneo.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":"2013-11-24T09:11:39.000Z","updated_at":"2014-01-07T18:35:46.000Z","dependencies_parsed_at":"2022-09-23T04:03:18.864Z","dependency_job_id":null,"html_url":"https://github.com/bjarneo/Q","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bjarneo/Q","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjarneo%2FQ","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjarneo%2FQ/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjarneo%2FQ/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjarneo%2FQ/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bjarneo","download_url":"https://codeload.github.com/bjarneo/Q/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjarneo%2FQ/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33072984,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T11:35:32.926Z","status":"ssl_error","status_checked_at":"2026-05-15T11:35:31.362Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":[],"created_at":"2024-11-10T17:37:43.604Z","updated_at":"2026-05-15T17:06:15.620Z","avatar_url":"https://github.com/bjarneo.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Q PHP Framework\n=\n\u003ca href=\"http://q.codephun.com/\" target=\"_blank\"\u003ehttp://q.codephun.com/\u003c/a\u003e\n\nThis is not a RESTful framework. This framework is ment for small applications that only needs few pages.\nRequires: \u003ca href=\"http://getcomposer.org\"\u003eComposer\u003c/a\u003e.\n\n###Install\n```php\n// Clone repository\ngit clone https://github.com/bjarneo/Q.git\n\n// Open Q directory\ncomposer install\n\n// Or if you composer.phar file isn't placed in your bin directory (unix systems) use this command\nphp composer.phar install\n```\n\n### Set up index.php file\n```php\n// Require composer's autoloader\nrequire 'vendor/autoload.php';\n\n// Create new instance of Q\n$app = new \\Q\\Q(array(\n    'mode' =\u003e 'development',        // 'production' for no error messages\n    'view_path' =\u003e './app/View/'    // Set view folder.\n));\n```\n\n### Append routes (paths)\n```php\n$app-\u003eroute('/', function() {\n    echo 'Hello Q';\n});\n```\n\n### Run application\n```php\n// After last route you've created you must run you application\n$app-\u003erun()\n```\n\n### Render view\n```php\n$app-\u003eroute('/hello', function() use ($app) {\n    $app-\u003erender('template.php');\n});\n```\n\n### Add data to templates\n```php\n$app-\u003eroute('/hello', function() use($app) {\n    $data = array(\n        'greeting' =\u003e 'Hello Q!'\n    );\n\n    // Now use echo $greeting in template.php\n    $app-\u003erender('template.php', $data);\n});\n```\n\n### How to use parameters\n```php\n// Add params as parameters in function\n$app-\u003eroute('/path', function($name, $age) {\n    printf(\"My name is: %s. I'm %s years old.\", $name, $age);\n});\n\n// Ex: domain.com/path/bjarneo/26\n// Ouput: My name is: bjarneo. I'm 26 years old.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbjarneo%2Fq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbjarneo%2Fq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbjarneo%2Fq/lists"}