Model configuration manager.  
 More...
|  | 
|  | __construct (?model $model=null) | 
|  | Constructor. 
 | 
|  | 
|  | check_dependencies (\stdClass $modeldata, bool $ignoreversionmismatches) | 
|  | Check that the provided model configuration can be deployed in this site. 
 | 
|  | 
|  | export (string $zipfilename, bool $includeweights=true) | 
|  | Exports a model to a zip using the provided file name. 
 | 
|  | 
|  | extract_import_contents (string $zipfilepath) | 
|  | Extracts the import zip contents. 
 | 
|  | 
|  | import (string $zipfilepath) | 
|  | Imports the provided model configuration into a new model. 
 | 
|  | 
|  | 
| const | CONFIG_FILE_NAME = 'model-config.json' | 
|  | The name of the file where config is held. 
 | 
|  | 
Model configuration manager. 
- Copyright
- 2019 David Monllao  
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 
◆ __construct()
      
        
          | core_analytics\model_config::__construct | ( | ?model | $model = null | ) |  | 
      
 
Constructor. 
- Parameters
- 
  
    | core_analytics\model | null | $model |  |  
 
 
 
◆ check_dependencies()
      
        
          | core_analytics\model_config::check_dependencies | ( | \stdClass | $modeldata, | 
        
          |  |  | bool | $ignoreversionmismatches ) | 
      
 
Check that the provided model configuration can be deployed in this site. 
- Parameters
- 
  
    | stdClass | $modeldata |  |  | bool | $ignoreversionmismatches |  |  
 
- Return values
- 
  
    | string|null | Error string or null if all good. |  
 
 
 
◆ export()
      
        
          | core_analytics\model_config::export | ( | string | $zipfilename, | 
        
          |  |  | bool | $includeweights = true ) | 
      
 
Exports a model to a zip using the provided file name. 
- Parameters
- 
  
    | string | $zipfilename |  |  | bool | $includeweights | Include the model weights if available |  
 
- Return values
- 
  
  
 
 
◆ export_model_data()
  
  | 
        
          | core_analytics\model_config::export_model_data | ( |  | ) |  |  | protected | 
 
Exports the configuration of the model. 
- Return values
- 
  
  
 
 
◆ extract_import_contents()
      
        
          | core_analytics\model_config::extract_import_contents | ( | string | $zipfilepath | ) |  | 
      
 
Extracts the import zip contents. 
- Parameters
- 
  
    | string | $zipfilepath | Zip file path |  
 
- Return values
- 
  
    | array | [0] => stdClass, [1] => string |  
 
 
 
◆ get_class_component()
  
  | 
        
          | static core_analytics\model_config::get_class_component | ( | string | $fullclassname | ) |  |  | static | 
 
Returns the component the class belongs to. 
Note that this method does not work for global space classes.
- Parameters
- 
  
    | string | $fullclassname | Qualified name including the namespace. |  
 
- Return values
- 
  
    | string|null | Frankenstyle component |  
 
 
 
◆ import()
      
        
          | core_analytics\model_config::import | ( | string | $zipfilepath | ) |  | 
      
 
Imports the provided model configuration into a new model. 
Note that this method assumes that self\check_dependencies has already been called.
- Parameters
- 
  
    | string | $zipfilepath | Path to the zip file to import |  
 
- Return values
- 
  
  
 
 
The documentation for this class was generated from the following file: