You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
570 B
PHP
40 lines
570 B
PHP
<?php
|
|
/**
|
|
* Created by PhpStorm.
|
|
* User: eater
|
|
* Date: 4/2/16
|
|
* Time: 2:52 PM
|
|
*/
|
|
|
|
namespace Eater\Glim\Service;
|
|
|
|
|
|
class TwigVars extends Main
|
|
{
|
|
private $vars = [];
|
|
|
|
/**
|
|
* @param array $vars
|
|
*/
|
|
public function add($vars)
|
|
{
|
|
$this->vars = $this->vars + $vars;
|
|
}
|
|
|
|
/**
|
|
* @param string $name
|
|
* @param mixed $value
|
|
*/
|
|
public function def($name, $value)
|
|
{
|
|
$this->vars[$name] = $value;
|
|
}
|
|
|
|
/**
|
|
* @return array
|
|
*/
|
|
public function getVars()
|
|
{
|
|
return $this->vars;
|
|
}
|
|
} |