{"id":13609666,"url":"https://github.com/natanfelles/codeigniter-phpstorm","last_synced_at":"2025-07-11T10:05:46.524Z","repository":{"id":37733422,"uuid":"54341995","full_name":"natanfelles/codeigniter-phpstorm","owner":"natanfelles","description":"PhpStorm Code Completion for CodeIgniter 3","archived":false,"fork":false,"pushed_at":"2020-01-24T20:10:55.000Z","size":291,"stargazers_count":203,"open_issues_count":5,"forks_count":101,"subscribers_count":33,"default_branch":"master","last_synced_at":"2025-05-08T21:27:30.707Z","etag":null,"topics":["code","code-completion","codeigniter","completion","hmvc","phpstorm"],"latest_commit_sha":null,"homepage":"https://natanfelles.github.io/blog/codeigniter-code-completion-phpstorm.html","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/natanfelles.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}},"created_at":"2016-03-20T21:39:33.000Z","updated_at":"2025-02-07T02:56:46.000Z","dependencies_parsed_at":"2022-09-16T06:12:27.898Z","dependency_job_id":null,"html_url":"https://github.com/natanfelles/codeigniter-phpstorm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/natanfelles/codeigniter-phpstorm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natanfelles%2Fcodeigniter-phpstorm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natanfelles%2Fcodeigniter-phpstorm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natanfelles%2Fcodeigniter-phpstorm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natanfelles%2Fcodeigniter-phpstorm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/natanfelles","download_url":"https://codeload.github.com/natanfelles/codeigniter-phpstorm/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natanfelles%2Fcodeigniter-phpstorm/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264780826,"owners_count":23662727,"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":["code","code-completion","codeigniter","completion","hmvc","phpstorm"],"created_at":"2024-08-01T19:01:36.954Z","updated_at":"2025-07-11T10:05:46.488Z","avatar_url":"https://github.com/natanfelles.png","language":"PHP","readme":"# PhpStorm Code Completion to CodeIgniter + HMVC\n\nWorking perfectly with CodeIgniter 3.*\n\n### How to use it:\n\n1. Drop the **phpstorm.php** file into your CI project root then PhpStorm will index it.\n2. Go to *system/core/* folder.\n3. Select *Controller.php* and *Model.php* files, right click and set *Mark as Plain Text*.\n\n### HMVC Support\n\nIf you are using the Modular HMVC, mark as Plain Text the Controller.php file in the MX folder.\n\nYou need to add the `@property` tag in the class doc block:\n\n```php\n/**\n * Class Cart\n * @property Cart $cart Cart module\n */\nclass Cart extends MX_Controller {\n\n\t/**\n\t * Add product to cart\n\t * @param int $id Product id\n\t */\n\tpublic function add($id = 0)\n\t{\n\t\t// Do it...\n\t}\n}\n```\n\nTo load modules in other places do like it:\n\n```php\n/**\n * @var Cart $cart This will provide Code Completion in the $cart variable\n */\n$cart = Modules::load('cart');\n```\n\nUse *Ctrl + Q* in `$cart` to load documentation or help with available functions:\n\n```php\n$cart-\u003eadd(5);\n```\n\n### Usage in Views\n\nIf you want load CI_Controller or MX_Controller in a view, add a doc block as follow:\n\n```php\n/**\n * @var CI_Controller $this\n */\necho $this-\u003euri-\u003esegment(1);\n````\n\n### Preview:\n![Image of Code Completion](https://raw.githubusercontent.com/natanfelles/codeigniter-phpstorm/master/codeigniter-phpstorm.png)\n\n","funding_links":[],"categories":["PHP"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnatanfelles%2Fcodeigniter-phpstorm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnatanfelles%2Fcodeigniter-phpstorm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnatanfelles%2Fcodeigniter-phpstorm/lists"}