{"id":21216876,"url":"https://github.com/lablnet/php-input-class","last_synced_at":"2025-06-13T07:05:05.381Z","repository":{"id":57010627,"uuid":"124357892","full_name":"lablnet/PHP-Input-Class","owner":"lablnet","description":"PHP input request handler class, This package can process the current HTTP request values.","archived":false,"fork":false,"pushed_at":"2019-10-05T05:21:32.000Z","size":16,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-18T09:46:59.171Z","etag":null,"topics":["class","fastest","free","get","handler","header","input","php","post","put","safe","secured"],"latest_commit_sha":null,"homepage":"","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/lablnet.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":"2018-03-08T08:04:03.000Z","updated_at":"2023-09-24T13:52:54.000Z","dependencies_parsed_at":"2022-08-21T13:10:12.425Z","dependency_job_id":null,"html_url":"https://github.com/lablnet/PHP-Input-Class","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lablnet%2FPHP-Input-Class","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lablnet%2FPHP-Input-Class/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lablnet%2FPHP-Input-Class/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lablnet%2FPHP-Input-Class/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lablnet","download_url":"https://codeload.github.com/lablnet/PHP-Input-Class/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225637087,"owners_count":17500360,"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":["class","fastest","free","get","handler","header","input","php","post","put","safe","secured"],"created_at":"2024-11-20T21:56:07.650Z","updated_at":"2024-11-20T21:56:08.399Z","avatar_url":"https://github.com/lablnet.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP input class\n## This package can process the current HTTP request values.\n\n## Requirement\n1. PHP\n2. Composer\n\n## Installation\nInstalling this package is very simple, first ensure you have the right PHP version and composer installed then in your terminal/(command prompt) run:  `composer require lablnet/input`\n\n## Dependencies\nThis class use `[lablnet/http-client](https://packagist.org/packages/lablnet/http-client)` library. \n\n## Feature\n\n 1. Supported method get,post,put,patch,delete,files,others.\n 2. Clean input method(clean XSS attack/sanitize input).\n 3. Determine whether request is ajax or not.\n 4. Restore line breaks method.\n\n# Description\nIt can access the HTTP request values and return them in a more convenient way to the application.\nCurrently it can check the input values when using the GET, POST, PUT, PATCH, DELETE, FILES etc parameters, filter the parameter values, check whether request is sent by a browser using AJAX, word wrap parameter values, check whether \nthe request is a form submission, fix parameter value line breaks.\n\n\u003e This class provide helpers functions for easily use of class.\n\n## Input\nYou can get input by calling `input` helpers or `Input::input` method\n```php \nrequire_once \"../vendor/autoload.php\";\n$username = input('username');\n```\n```php\n//in OOP style\nuse Lablnet\\Input;\nrequire_once \"../vendor/autoload.php\";\n$username = Input::input('username');\n```\n\n## Escape\nYou can escape input by calling `escape` helpers or `Input::escape` method\n```php \nrequire_once \"../vendor/autoload.php\";\n$username = escape(input('username'));\n```\n```php\n//in OOP style\nuse Lablnet\\Input;\nrequire_once \"../vendor/autoload.php\";\n$username = Input::clean(Input::input('username'));\n```\n\n## Determine whether request is ajax/xhr?\nYou can determine current request  by calling `is_ajax` helpers or `Input::isAjax` method\n```php \nrequire_once \"../vendor/autoload.php\";\nif (is_ajax('name')) {\n\t//ajax\n}\n```\n```php\n//in OOP style\nuse Lablnet\\Input;\nrequire_once \"../vendor/autoload.php\";\nif (Input::isAjax('name')) {\n\t//ajax\n}\n```\n\n## Restore line breaks\nYou can restore line breaks by calling `restore_line_break` helpers or `Input::restoreLineBreaks` method\n```php \nrequire_once \"../vendor/autoload.php\";\n$comment = restore_line_break(escape(input('username')));\n```\n```php\n//in OOP style\nuse Lablnet\\Input;\nrequire_once \"../vendor/autoload.php\";\n$comment = Input::restoreLineBreaks(Input::clean(Input::input('username')));\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flablnet%2Fphp-input-class","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flablnet%2Fphp-input-class","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flablnet%2Fphp-input-class/lists"}