~ubuntu-branches/ubuntu/utopic/zendframework/utopic

« back to all changes in this revision

Viewing changes to library/Zend/Controller/Action/Helper/Cache.php

  • Committer: Bazaar Package Importer
  • Author(s): Frank Habermann
  • Date: 2010-04-28 20:10:00 UTC
  • mfrom: (1.3.1 upstream) (9.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20100428201000-o347bj5qb5i3tpot
Tags: 1.10.4-1
new upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
64
64
     * @var array
65
65
     */
66
66
    protected $_tags = array();
 
67
    
 
68
    /**
 
69
     * Indexed map of Extensions by Controller and Action
 
70
     *
 
71
     * @var array
 
72
     */
 
73
    protected $_extensions = array();
67
74
 
68
75
    /**
69
76
     * Track output buffering condition
78
85
     * @param array $tags
79
86
     * @return void
80
87
     */
81
 
    public function direct(array $actions, array $tags = array())
 
88
    public function direct(array $actions, array $tags = array(), $extension = null)
82
89
    {
83
90
        $controller = $this->getRequest()->getControllerName();
84
91
        $actions = array_unique($actions);
100
107
                }
101
108
            }
102
109
        }
 
110
        if ($extension) {
 
111
            if (!isset($this->_extensions[$controller])) {
 
112
                $this->_extensions[$controller] = array();
 
113
            }
 
114
            foreach ($actions as $action) {
 
115
                $this->_extensions[$controller][$action] = $extension;
 
116
            }
 
117
        }
103
118
    }
104
119
 
105
120
    /**
166
181
            && !empty($this->_tags[$controller][$action])) {
167
182
                $tags = array_unique($this->_tags[$controller][$action]);
168
183
            }
 
184
            $extension = null;
 
185
            if (isset($this->_extensions[$controller][$action])) {
 
186
                $extension = $this->_extensions[$controller][$action];
 
187
            }
169
188
            $this->getCache(Zend_Cache_Manager::PAGECACHE)
170
 
                ->start($this->_encodeCacheId($reqUri), $tags);
 
189
                ->start($this->_encodeCacheId($reqUri), $tags, $extension);
171
190
        }
172
191
    }
173
192