/www/slight

To get this branch, use:
bzr branch http://bzr.ed.am/www/slight

« back to all changes in this revision

Viewing changes to flight/template/View.php

  • Committer: Tim Marston
  • Date: 2015-12-01 11:00:59 UTC
  • Revision ID: tim@ed.am-20151201110059-jt9s2wyv5quhadqz
flight: set only references to variables in views

Show diffs side-by-side

added added

removed removed

62
62
     */
63
63
    public function set($key, &$value = null) {
64
64
        if (is_array($key) || is_object($key)) {
65
 
            foreach ($key as $k => $v) {
 
65
            foreach ($key as $k => &$v) {
66
66
                $this->vars[$k] = $v;
67
67
            }
68
68
        }
69
69
        else {
70
 
            $this->vars[$key] = $value;
 
70
            $this->vars[$key] = &$value;
71
71
        }
72
72
    }
73
73