static private function _create_model(array $data)
    {
        self::$preventInit = true;
        self::$skipDefaultAttributes = true;
        $model = new static();
        $model->attributes = $data;
        
        # Check for primary_key and set init_attrs.
        if (!static::table()->primaryKey()) {
            $model->storedAttributes = $data;
        }
        $model->isNewRecord = false;
        $model->_register();
        $model->init();
        
        return $model;
    }
static private function _create_model(array $data)
    {
        self::$preventInit = true;
        self::$skipDefaultAttributes = true;
        $model = new static();
        $model->attributes = $data;
        
        # Check for primary_key and set init_attrs.
        if (!static::table()->primaryKey()) {
            $model->storedAttributes = $data;
        }
        $model->isNewRecord = false;
        $model->_register();
        $model->init();
        
        return $model;
    }
static private function _create_model ( array $ data ) { self :: $ preventInit = true ; self :: $ skipDefaultAttributes = true ; $ model = new static ( ) ; $ model -> attributes = $ data ; # Check for primary_key and set init_attrs. if ( ! static :: table ( ) -> primaryKey ( ) ) { $ model -> storedAttributes = $ data ; } $ model -> isNewRecord = false ; $ model -> _register ( ) ; $ model -> init ( ) ; return $ model ; }
Creates and returns a non-empty model.
This function is useful to centralize the creation of non-empty models,
since isNewRecord must set to null by passing non_empty.
Creates and returns a non - empty model . This function is useful to centralize the creation of non - empty models since isNewRecord must set to null by passing non_empty .