trigger_error("Application controller doesn't exist: $controllerClass. If you've just added application code, update includes/autoload.php file to register your new classes.",
thrownewException("Authentication method doesn't exist: $class. If you've just added authentication code, update includes/autoload.php file to register your new classes.");
thrownewException("CollectionDocument children class doesn't exist: $type. If you've just added authentication code, update includes/autoload.php file to register your new classes.");
}
}else{
$type=null;
}
$instance->collections[$name]=$type;
}
}
//Header string
if(property_exists($data,'header')){
$instance->header=$data->header;
}
//Footer string
if(property_exists($data,'footer')){
$instance->footer=$data->footer;
}
return$instance;
}
/**
* Gets the full name of a collection, with the workspace prefix
*
* @param Workspace $workspace The current workspace
* @param string $name The collection name
*
* @return string The full name of the collection
*/
publicstaticfunctiongetCollectionNameWithPrefix(
Workspace$workspace,
string$name
){
return$workspace->code.'-'.$name;
}
/**
* Loads a WorkspaceConfiguration instance deserializing a JSON file