Helper concept to use mn8 environment variables.
Env Handler concept can only read mn8 environment variables from memory.
URL format is :
env://<path>
Possible options :
-
filter
- use this option to specify filter for your results.
print the '/system/protocols/' names
$x from "env:/system/protocols/"
print $x
print the '/system/protocols/' names where names contains tp
string
$x from "env:/system/protocols/" options "filter"=Simplex.create("*tp")
print $x
Methods inherited from: Concept
cloneConcept, extendsConcept, fromXML, getAllInheritedConcepts, getConceptAttribute, getConceptAttributeField, getConceptAttributeFields, getConceptAttributes, getConceptConstructors, getConceptElement, getConceptElementField, getConceptElementFields, getConceptElements, getConceptLabel, getConceptMethod, getConceptMethods, getConceptOperators, getConceptType, getErrorHandler, getInheritedConcepts, getResourceURI, hasConceptAttribute, hasConceptElement, hasConceptMethod, hasPath, isHidden, loadContent, setConceptLabel, setErrorHandler, setHidden, setShowEmpty, showEmpty, toTXT, toXML, setResourceURI |
|
Methods inherited from: URIHandler
|
Parameters: |
$url : | The url to the location in the memory where the data will be stored. |
|
Creates a new EnvHandler with the given $url.
Parameters: |
$uri : | The uri which will be tested if it is acceptable by this handler. |
|
Returns true if the given $uri is acceptable by this handler, false
otherwise.
print EnvHandler.acceptsURI("env://system/protocol")
-- the result is --
true
Returns true and close this connection.
$url = "env://system/protocols"
$env = EnvHandler.create($url)
if $env.acceptsURI( $url ) then [
$m typeof Map
if ( $env.initialize( $m ) ) then [
if ( $env.openConnection ) then [
print $env.getContent
$env.closeConnection
]
]
]
-- the result is --
env://system/protocols/mbox
env://system/protocols/file
env://system/protocols/beep
env://system/protocols/google
env://system/protocols/smtp
env://system/protocols/env
env://system/protocols/xmlrpc
env://system/protocols/pop3
env://system/protocols/mem
env://system/protocols/http
env://system/protocols/ftp
Exceptions: |
badURLException :
(Warning) | The URL isn't valid. |
Returns the content of this handler.
$url = "env://system/protocols"
$env = EnvHandler.create($url)
if $env.acceptsURI( $url ) then [
$m typeof Map
if ( $env.initialize( $m ) ) then [
if ( $env.openConnection ) then [
print $env.getContent
$env.closeConnection
]
]
]
-- the result is --
env://system/protocols/mbox
env://system/protocols/file
env://system/protocols/beep
env://system/protocols/google
env://system/protocols/smtp
env://system/protocols/env
env://system/protocols/xmlrpc
env://system/protocols/pop3
env://system/protocols/mem
env://system/protocols/http
env://system/protocols/ftp
Parameters: |
$options : |
Contains a filter with which the returned content will be filtered. |
|
Returns true.
$url = "env://system/protocols"
$env = EnvHandler.create($url)
if $env.acceptsURI( $url ) then [
$m typeof Map
if ( $env.initialize( $m ) ) then [
if ( $env.openConnection ) then [
print $env.getContent
$env.closeConnection
]
]
]
-- the result is --
env://system/protocols/mbox
env://system/protocols/file
env://system/protocols/beep
env://system/protocols/google
env://system/protocols/smtp
env://system/protocols/env
env://system/protocols/xmlrpc
env://system/protocols/pop3
env://system/protocols/mem
env://system/protocols/http
env://system/protocols/ftp
Returns true.
$url = "env://system/protocols"
$env = EnvHandler.create($url)
if $env.acceptsURI( $url ) then [
$m typeof Map
if ( $env.initialize( $m ) ) then [
if ( $env.openConnection ) then [
print $env.getContent
$env.closeConnection
]
]
]
-- the result is --
env://system/protocols/mbox
env://system/protocols/file
env://system/protocols/beep
env://system/protocols/google
env://system/protocols/smtp
env://system/protocols/env
env://system/protocols/xmlrpc
env://system/protocols/pop3
env://system/protocols/mem
env://system/protocols/http
env://system/protocols/ftp