Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/foundeo/cfdocs
Browse files Browse the repository at this point in the history
  • Loading branch information
pfreitag committed Oct 14, 2024
2 parents 57d6565 + f3b1cc9 commit 477f1ac
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 0 deletions.
1 change: 1 addition & 0 deletions data/en/cfswitch.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name":"cfswitch",
"type":"tag",
"syntax":"<cfswitch expression=\"\">",
"script":"switch (expression) { }",
"related":["cfcase","cfdefaultcase"],
"description":"Evaluates a passed expression and passes control to the cfcase tag that matches the expression result. You can, optionally, code a cfdefaultcase tag, which receives control if there is no matching cfcase tag value. Note the difference in the tag and script syntax when providing multiple values for a case.",
"params": [
Expand Down
72 changes: 72 additions & 0 deletions data/en/configimport.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"name":"configImport",
"type":"function",
"syntax":"configImport(path path, [, type] [, password], [, params], [, charset])",
"returns":"struct",
"related":["configTranslate"],
"description":"Imports a configuration based on the CFConfig format.",
"params": [

{
"name":"path",
"description":"Path to the .CFConfig.json file or the data itself as a Struct.",
"required":true,
"default":"false",
"type":"any",
"values":[]
},

{
"name":"type",
"description":"Config Context to manipulate, server or web context.",
"required":false,
"default":"server",
"type":"string",
"values":["web", "server"]
},

{
"name":"password",
"description":"password to access the configuration, depending on the value set for the attribute type.",
"required":false,
"default":"false",
"type":"string",
"values":[]
},

{
"name":"params",
"description":"placeholder parameters to use as actual data for the placeholders inside the configuration.",
"required":false,
"default":"false",
"type":"struct",
"values":[]
},

{
"name":"charset",
"description":"charset to use to read the .CFConfig file, if not defined, Lucee will use the default resource charset.",
"required":false,
"default":"false",
"type":"string",
"values":[]
}

],
"engines": {
"lucee": {"minimum_version":"5.3.8.207", "notes":"", "docs":"https://docs.lucee.org/reference/functions/configimport.html"}
},
"links": [{
"title":"configimport",
"description":"Lucee Documentation for configimport",
"url":"https://docs.lucee.org/reference/functions/configimport.html"
}],
"examples": [
{
"title": "Example for importing a configuration",
"description": "Imports a configuration based on the CFConfig format from a file using a passeword stored in an environment variable.",
"code": "configImport(\n\tpath: expandPath('/config/config.json'),\n\ttype: 'server',\n\tpassword: SERVER.system.environment.PASSWORD\n);",
"runnable":false
}
]
}

0 comments on commit 477f1ac

Please sign in to comment.