phalcon/cphalcon · error · Phalcon\Mvc\Model\Exceptions\ModelCouldNotLoad

Model '{modelName}' could not be loaded

Error message

Model '{modelName}' could not be loaded

What it means

Error "Model '{modelName}' could not be loaded" thrown in phalcon/cphalcon.

Source

Thrown at phalcon/Mvc/Model/Manager.zep:2022

        let this->keepSnapshots[get_class_lower(model)] = keepSnapshots;
    }

    /**
     * Loads a model throwing an exception if it does not exist
     *
     * @param string $modelName
     *
     * @return ModelInterface
     */
    public function load( string modelName) -> <ModelInterface>
    {
        var model;

        /**
         * The model does not exist throw an exception
         */
        if unlikely !class_exists(modelName) {
            throw new ModelCouldNotLoad(modelName);
        }

        /**
         * Load it using an autoloader
         */
        let model = create_instance_params(
            modelName,
            [
                null,
                this->container,
                this
            ]
        );

        return model;
    }

    /**

View on GitHub (pinned to b7419de9cd)

When it happens

Trigger: Thrown at phalcon/Mvc/Model/Manager.zep:2022 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of phalcon/cphalcon@b7419de9cd (2026-08-21). Data as JSON: /api/errors/5f5264d20d257f0a. Report an issue: GitHub.