-
Notifications
You must be signed in to change notification settings - Fork 285
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/lucee/lucee-docs
- Loading branch information
Showing
13 changed files
with
116 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
--- | ||
title: CreateGUID | ||
id: function-createguid | ||
related: | ||
categories: | ||
- core | ||
--- | ||
|
||
A globally unique identifier or GUID is a special type of identifier used in software applications to provide an unique reference number. | ||
|
||
The value is represented as a 32 character hexadecimal string, such as {21EC2020-3AEA-1069-A2DD-08002B30309D} and usually stored as a 128 bit integer. | ||
The value is represented as a 32 character hexadecimal string, such as {21EC2020-3AEA-1069-A2DD-08002B30309D} and usually stored as a 128 bit integer. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,12 @@ | ||
```luceescript+trycf | ||
writeDump(getPageContext()); | ||
echo("Click to expand"); | ||
pc = getPageContext(); | ||
dump(var=pc, label="PageContext", expand=false); | ||
dump(var=pc.getCFMLFactory(), label="CFMLFactory", expand=false); | ||
dump(var=pc.getCFMLFactory().getEngine(), label="Engine",expand=false); | ||
if( listFirst(server.lucee.version,".") lte 5) | ||
dump(var=pc.getCFMLFactory().getConfig(), label="Config",expand=false); | ||
else | ||
dump(var=pc.getCFMLFactory().getConfigServer(), label="ConfigServer",expand=false); | ||
dump(var=pc.getCFMLFactory().getScopeContext(), label="ScopeContext",expand=false); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
--- | ||
title: lslcase | ||
title: LSLCase | ||
id: function-lslcase | ||
related: | ||
- function-lcase | ||
categories: | ||
- internationalization | ||
--- | ||
|
||
Converts the alphabetic characters in a specified string to lowercase, respecting locale-specific casing rules. This is particularly important for languages where the standard lowercase conversion rules do not apply, ensuring accurate and culturally correct text processing. The function defaults to the current page's locale if no locale is specified. | ||
Converts the alphabetic characters in a specified string to lowercase, respecting locale-specific casing rules. This is particularly important for languages where the standard lowercase conversion rules do not apply, ensuring accurate and culturally correct text processing. The function defaults to the current page's locale if no locale is specified. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,13 @@ | ||
--- | ||
title: lsucase | ||
title: LSUCase | ||
id: function-lsucase | ||
related: | ||
- function-ucase | ||
categories: | ||
- internationalization | ||
description: Converts the alphabetic characters in a specified string to uppercase, respecting locale-specific casing rules | ||
--- | ||
|
||
Converts the alphabetic characters in a specified string to uppercase, | ||
respecting locale-specific casing rules. This is particularly important for languages where the standard lowercase conversion rules do not apply, | ||
ensuring accurate and culturally correct text processing. The function defaults to the current page's locale if no locale is specified. | ||
ensuring accurate and culturally correct text processing. The function defaults to the current page's locale if no locale is specified. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
```luceescript+trycf | ||
// First, let's create a simple UDF that returns a value | ||
function getName() { | ||
return "John Doe"; | ||
} | ||
// Create a reference to the getName function using ValueRef() | ||
name = ValueRef(getName); | ||
// Example 1: Basic Usage | ||
writeOutput("Direct function call: " & getName() & "<br>"); | ||
writeOutput("Using ValueRef: " & name & "<br>"); | ||
// Example 2: Using ValueRef with a more complex UDF | ||
function calculateTotal(price, quantity) { | ||
return price * quantity; | ||
} | ||
// Create a reference with preset values | ||
fixedCalculation = ValueRef(function() { | ||
return calculateTotal(10, 5); | ||
}); | ||
writeOutput("Fixed calculation result: " & fixedCalculation & "<br>"); | ||
// Example 3: Using ValueRef with a closure | ||
counter = 0; | ||
incrementCounter = ValueRef(function() { | ||
counter++; | ||
return counter; | ||
}); | ||
writeOutput("Counter value: " & incrementCounter & "<br>"); | ||
writeOutput("Counter value: " & incrementCounter & "<br>"); | ||
// Example 4: Using ValueRef in a struct | ||
person = { | ||
firstName: ValueRef(function() { | ||
return "Jane"; | ||
}), | ||
lastName: ValueRef(function() { | ||
return "Smith"; | ||
}), | ||
fullName: ValueRef(function() { | ||
// Note: This would need to be implemented differently in practice | ||
// as the ValueRef doesn't have access to the other references directly | ||
return "Jane Smith"; | ||
}) | ||
}; | ||
writeOutput("Person's full name: " & person.fullName); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
--- | ||
title: valueref | ||
title: ValueRef | ||
id: function-valueref | ||
related: | ||
categories: | ||
- tag-function | ||
--- | ||
|
||
creates a reference to a UDF that acts like a simple value. | ||
creates a reference to a UDF that acts like a simple value. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters