{"record":{"id":"f15cead5bf6e3e15","repo":"phalcon/cphalcon","slug":"handler-must-implement-phalcon-mvc-model-binder-bi","errorCode":null,"errorMessage":"Handler must implement Phalcon\\Mvc\\Model\\Binder\\BindableInterface in order to use Phalcon\\Mvc\\Model as parameter","messagePattern":"Handler must implement Phalcon\\\\Mvc\\\\Model\\\\Binder\\\\BindableInterface in order to use Phalcon\\\\Mvc\\\\Model as parameter","errorType":"exception","errorClass":"Phalcon\\Mvc\\Model\\Exceptions\\HandlerMustImplementBindable","httpStatus":null,"severity":"error","filePath":"phalcon/Mvc/Model/Binder.zep","lineNumber":223,"sourceCode":"\n            let className = reflectionClass->getName();\n\n            if !isset params[paramKey] {\n                let paramKey = paramsKeys[paramKey];\n            }\n\n            let boundModel = null;\n            let paramValue = params[paramKey];\n\n            if className == Model::class {\n                if realClasses == null {\n                    if handler instanceof BindModelInterface {\n                        let handlerClass = get_class(handler);\n                        let realClasses = {handlerClass}::getModelName();\n                    } elseif handler instanceof BindableInterface {\n                        let realClasses = handler->getModelName();\n                    } else {\n                        throw new HandlerMustImplementBindable();\n                    }\n                }\n\n                if typeof realClasses == \"array\" {\n                    if unlikely !fetch className, realClasses[paramKey] {\n                        throw new MissingModelClassName(paramKey);\n                    }\n\n                    let boundModel = this->findBoundModel(paramValue, className);\n                } elseif typeof realClasses == \"string\" {\n                    let className = realClasses;\n                    let boundModel = this->findBoundModel(paramValue, className);\n                } else {\n                    throw new InvalidGetModelNameReturn();\n                }\n            } elseif is_subclass_of(className, Model::class) {\n                let boundModel = this->findBoundModel(paramValue, className);\n            }","sourceCodeStart":205,"sourceCodeEnd":241,"githubUrl":"https://github.com/phalcon/cphalcon/blob/b7419de9cd0a8a3f48441ead84c9f8415d463e25/phalcon/Mvc/Model/Binder.zep#L205-L241","documentation":"Error \"Handler must implement Phalcon\\Mvc\\Model\\Binder\\BindableInterface in order to use Phalcon\\Mvc\\Model as parameter\" thrown in phalcon/cphalcon.","triggerScenarios":"Thrown at phalcon/Mvc/Model/Binder.zep:223 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b7419de9cd0a8a3f48441ead84c9f8415d463e25","analyzedAt":"2026-08-21T06:21:18.811Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}