~desarrollokumbia/kumbia/0.5

« back to all changes in this revision

Viewing changes to library/kumbia/filter/filter.php

  • Committer: Deivinson Tejeda
  • Date: 2009-01-01 20:30:45 UTC
  • Revision ID: deivinsontejeda@gmail.com-20090101203045-q9xgzpp0a6vaomdh
actualizando repositorio launchpad

Show diffs side-by-side

added added

removed removed

Lines of Context:
169
169
         * @param array $params
170
170
         * @return array
171
171
         */
172
 
        public function get_params($params)
173
 
        {
174
 
                $data = array();
175
 
                $i = 0;
176
 
                foreach ($params as $p) {
177
 
                        if(is_string($p) && ereg("^([a-z\._0-9]+[:][ ]).+$", $p, $regs)){
178
 
                                $p = str_replace($regs[1], "", $p);
179
 
                                $n = str_replace(": ", "", $regs[1]);
180
 
                                $data[$n] = $p;
 
172
        function get_params($params){
 
173
        $data = array();
 
174
        $i = 0;
 
175
        foreach ($params as $p) {
 
176
                if(is_string($p) && preg_match('/(\w+): (.*)/', $p, $match)){
 
177
                        $data[$match[1]] = $match[2];
181
178
                        } else {
182
179
                                $data[$i] = $p;
183
180
                                $i++;
184
181
                        }
185
182
                }
186
 
                return $data;
 
183
        return $data;
187
184
        }
188
185
        /**
189
186
         * Agrega un filtro a la cola de filtros