<?php
require_once 'Zend/Filter/Interface.php';

class Bullhead_Filter_OptionLabel implements Zend_Filter_Interface
{
    protected $_list = array();
    
    public function __construct($list = array())
    {
        $this->_list = $list;
    }
    
    public function filter($value)
    {
        if (is_array($value)) {
            foreach ($value as $val)  {
                return $this->filter($val);
            }
        } else if (isset($this->_list[$value])) {
            return $this->_list[$value];
        }
        return $value;
    }

}
?>