SUIT Framework

Scripting Using Integrated Templates

Docs - listing

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

Available Since: Rulebox (1.0.0)

Check if the variable is whitelisted or blacklisted and determine whether or not the variable can be used.

Syntax bool templating.listing ( str name, dict variable )
Parameters
name

The name of the variable to check.

variable

A dict containing the `list` and `blacklist` keys if applicable.

Return Value

Whether or not the variable can be used.

Examples
Basic Usage
PHP
<?php
require 'suit.class.php';
require 'templating.class.php';
$suit = new SUIT();
$templating = new Templating($suit);
$variable = array
(
    'blacklist' => true,
    'list' => array('restricted')
);
$result = $templating->listing('restricted', $variable);
// Result: false
?>
Python
from rulebox import templating
variable = {
    'blacklist': True,
    'list': ['restricted']
}
result = templating.listing('restricted', variable)
# Result: False