SUIT Framework

Scripting Using Integrated Templates

Docs - configitems

07/31/2010: SUIT 2.0.1 and Rulebox 1.1.0 released.

Available Since: SUIT (2.0.0)

Get the specified items from the config.

Syntax dict suit.configitems ( dict config, list items )
Parameters
config

The dict to grab from.

items

The items to grab from the dict.

Return Value

The dict with the specified items.

Examples
Basic Usage
PHP
<?php
require 'suit.class.php';
$suit = new SUIT();
$config = array
(
    'unclosed': False,
    'insensitive': True,
    'log': True,
    'mismatched': False,
    'escape': '\\'
);
$selected = $suit->configitems($config, array('escape'));
/*
Result: array
(
    'escape' => '\\'
)
*/
?>
Python
import suit
config = {
    'unclosed': False,
    'insensitive': True,
    'log': True,
    'mismatched': False,
    'escape': '\\'
}
selected = suit.configitems(config, ['escape'])
# Result: {
#     'escape': '\\'
# }
See Also