{"action":"opened","issue":{"url":"https://api.github.com/repos/yiisoft/yii2/issues/7181","labels_url":"https://api.github.com/repos/yiisoft/yii2/issues/7181/labels{/name}","comments_url":"https://api.github.com/repos/yiisoft/yii2/issues/7181/comments","events_url":"https://api.github.com/repos/yiisoft/yii2/issues/7181/events","html_url":"https://github.com/yiisoft/yii2/issues/7181","id":56685746,"number":7181,"title":"Add boxing (for validation and filtering) to \\yii\\web\\Controller::bindActionParams ?","user":{"login":"mcd-php","id":3469206,"avatar_url":"https://avatars.githubusercontent.com/u/3469206?v=3","gravatar_id":"","url":"https://api.github.com/users/mcd-php","html_url":"https://github.com/mcd-php","followers_url":"https://api.github.com/users/mcd-php/followers","following_url":"https://api.github.com/users/mcd-php/following{/other_user}","gists_url":"https://api.github.com/users/mcd-php/gists{/gist_id}","starred_url":"https://api.github.com/users/mcd-php/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcd-php/subscriptions","organizations_url":"https://api.github.com/users/mcd-php/orgs","repos_url":"https://api.github.com/users/mcd-php/repos","events_url":"https://api.github.com/users/mcd-php/events{/privacy}","received_events_url":"https://api.github.com/users/mcd-php/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-05T15:37:18Z","updated_at":"2015-02-05T15:37:18Z","closed_at":null,"body":"Use case:\r\n\r\n```php\r\nclass PostController extends Controller {\r\n    public function actionEdit( UUIDParam $postId, HtmlPurifierParam $text ) {\r\n        // ...\r\n    }\r\n}\r\n```\r\nSomewhere in `bindActionParams()`:\r\n```php\r\nif ( $paramClass ) {\r\n    $boxedParam = new $paramClass($rawParam);\r\n}\r\n```\r\nAnd in constructors of boxed parameters, I can do whatever I want - filter, validate, throw exceptions, even pre-load model by ID and check logical rights on it given the current user.\r\n\r\nWhat will be an advice from core team for me to implement it, if I decide to ?"}}