{"id":25359718,"url":"https://github.com/wilforlan/cogentphp","last_synced_at":"2025-10-29T23:31:37.936Z","repository":{"id":43551356,"uuid":"67258585","full_name":"wilforlan/CogentPHP","owner":"wilforlan","description":"A Simple PHP MVC Framework ","archived":false,"fork":false,"pushed_at":"2017-01-22T15:27:19.000Z","size":929,"stargazers_count":40,"open_issues_count":1,"forks_count":15,"subscribers_count":5,"default_branch":"master","last_synced_at":"2023-03-08T04:49:02.319Z","etag":null,"topics":["php"],"latest_commit_sha":null,"homepage":"","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wilforlan.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":"2016-09-02T22:22:53.000Z","updated_at":"2022-11-26T13:34:18.000Z","dependencies_parsed_at":"2022-09-01T13:50:57.048Z","dependency_job_id":null,"html_url":"https://github.com/wilforlan/CogentPHP","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wilforlan%2FCogentPHP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wilforlan%2FCogentPHP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wilforlan%2FCogentPHP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wilforlan%2FCogentPHP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wilforlan","download_url":"https://codeload.github.com/wilforlan/CogentPHP/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238909493,"owners_count":19550845,"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":["php"],"created_at":"2025-02-14T21:07:34.130Z","updated_at":"2025-10-29T23:31:32.446Z","avatar_url":"https://github.com/wilforlan.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CogentPHP\nA Simple PHP Framework For Fast Project Kick Start\n\n## Getting Started\n\nCogentPHP uses Composer to Manage Dependencies and You need to have Composer installed on your machine to continue\nIf you dont already have composer,\n\tDownload it here: http://getcomposer.org/\n\nAfter Installing Composer,\nRun\n\n\tgit clone https://github.com/wilforlan/CogentPHP.git CogentPHP\n\tcd path_to_file/CogentPHP \u0026\u0026 php -S localhost:3000\n\nOR\nIn your browser, Open localhost/CogentPHP\n\n## Guide\n\nSample Projects Exist at:\n\n\n\t\thttps://github.com/wilforlan/CogentBlog\n\t\thttps://github.com/wilforlan/Automobile-Dianostic\n\n\n**Routing**\n\nRouting is a very essential part of a Web Application. CogentPHP has an simple yet elegant way of handling routing.\n\n\tWe are going to explain this With an Example.\n\n\t- accountController.php\n\n\t\u003c?php\n\n\t/** Autoloading The required Classes **/\n\n\tuse Core\\Core\\C_Base;\n\tuse Core\\Core\\Redirect;\n\n\tclass IndexController extends C_Base\n\t  {\n\t  \tfunction __construct( $tile )\n\t  \t{\n\t      /** Loading the corresponding Model class **/\n\t  \t\t$this-\u003emodel = new $tile;\n\t  \t}\n\n\t  \tpublic function index()\n\t  \t{\n\t      /** Initializing a index.html view Found in (Views/index.html) **/\n\t      Init::view('index');\n\t  \t}\n\n\t\t\tpublic function pay()\n\t  \t{\n\t      /** Initializing a index.html view Found in (Views/index.html) **/\n\t      Init::view('index');\n\t  \t}\n\n\t\t\tpublic function withdraw()\n\t  \t{\n\t      /** Initializing a index.html view Found in (Views/index.html) **/\n\t      Init::view('index');\n\t  \t}\n\n\t}\n\t ?\u003e\n\nTo generate URL from the Above controller, We have\n\n\tlocalhost/account/\n\t\tThe URL Maps to accountController -\u003e index()\n\t\tSince no Method is Specified in URL, It maps it to index method by default.\n\n\tlocalhost/account/pay\n\t \tThis URL Maps to accountController -\u003e pay()\n\tlocalhost/account/withdraw\n\t \tThis URL Maps to accountController -\u003e withdraw()\n\tlocalhost/account/begin\n\t \tThis results in a 404 error, Because the method begin() doesn't exist in the Class\n\n\n\tThe URL is Case Insensitive as:\n\n\taccountController -\u003e withdrawMoney() ==\n\n\t1. localhost/account/withdrawmoney\n\t2. localhost/account/withdrawMoney\n\n\t\tThey Both Evaluate to the same Method\n\n**Command Line**\n\n\tAvailable Command List:\n\n\tphp cogent app:create-controller [controllerName] [options]\n\n\t\tcontrollerName \t-\u003e Name of the Controller to be generated.\n\t\toptions \t\t\t\t-\u003e Generation Options\n\t\t\tAvailable Options\n\t\t\t\twithModel -\u003e This Option Generate a Model File to the Model Directory for the corresponding Controller\n\n\tphp cogent app:create-model [modelName] [options]\n\n\t\tmodelName \t\t\t-\u003e Name of the Model to be generated.\n\t\toptions \t\t\t\t-\u003e Generation Options\n\t\t\tAvailable Options\n\t\t\t\twithController -\u003e This Option Generate a Controller File to the Controllers Directory for the corresponding Model\n\n\tphp cogent app:request-url [url] [method]\n\n\t\turl \t\t\t\t\t\t-\u003e URL that you want to make request to. Do not omit http://\n\t\tmethod\t \t\t\t\t-\u003e Request Method: Default is GET\n\t\t\tAvailable Method\n\t\t\tGET \t-\u003e Send Request using GET\n\t\t\tPOST \t-\u003e Sends Request with POST, Using HTTP Build Query to Build Params\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwilforlan%2Fcogentphp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwilforlan%2Fcogentphp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwilforlan%2Fcogentphp/lists"}