Source for file Pattern.class.php
Documentation is available at Pattern.class.php
* This work is hereby released into the Public Domain.
* To view a copy of the public domain dedication,
* visit http://creativecommons.org/licenses/publicdomain/ or send a letter to
* Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.
require_once dirname(__FILE__ ). "/Graph.class.php";
* All patterns must derivate from this class
* @package linea21.externals
protected $args = array();
* @param string $pattern Pattern name
public static function get($pattern) {
$class = $pattern. 'Pattern';
* Change pattern argument
* @param string $name Argument name
* @param mixed $value Argument value
public function setArg($name, $value) {
$this->args[$name] = $value;
* @param mixed $default Default value if the argument does not exist (default to NULL)
* @return mixed Argument value
protected function getArg($name, $default = NULL) {
return $this->args[$name];
* Change several arguments
* @param array $args New arguments
foreach($args as $name => $value) {
|