PHP OOP: method?
- by Isis
Hello
<?php
class Templater
{
static $params = array();
public static function assign($name, $value)
{
self::$params[] = array($name => $value);
}
public static function draw()
{
self::$params;
}
}
$test = Templater::assign('key', 'value');
$test = Templater::draw();
print_r($test);
How to alter this script so I could use this:?
$test = Templater::assign('key', 'value')->assign('key2', 'value2')-draw();
print_r($test);