public function setAdapter($adapter, $options = null)
    {
        $adapter = ucfirst(strtolower($adapter));

        if (Zend_Loader::isReadable('Zend/Validate/Barcode/' . $adapter. '.php')) {
            $adapter = 'Zend_Validate_Barcode_' . $adapter;
        }

        if (!class_exists($adapter)) {
            Zend_Loader::loadClass($adapter);
        }

        $this->_adapter = new $adapter($options);
        if (!$this->_adapter instanceof Zend_Validate_Barcode_AdapterInterface) {

            throw new Zend_Validate_Exception(
                "Adapter " . $adapter . " does not implement Zend_Validate_Barcode_AdapterInterface"
            );
        }

        return $this;
    }
public function setAdapter($adapter, $options = null)
    {
        $adapter = ucfirst(strtolower($adapter));

        if (Zend_Loader::isReadable('Zend/Validate/Barcode/' . $adapter. '.php')) {
            $adapter = 'Zend_Validate_Barcode_' . $adapter;
        }

        if (!class_exists($adapter)) {
            Zend_Loader::loadClass($adapter);
        }

        $this->_adapter = new $adapter($options);
        if (!$this->_adapter instanceof Zend_Validate_Barcode_AdapterInterface) {

            throw new Zend_Validate_Exception(
                "Adapter " . $adapter . " does not implement Zend_Validate_Barcode_AdapterInterface"
            );
        }

        return $this;
    }
public function setAdapter ( $ adapter , $ options = null ) { $ adapter = ucfirst ( strtolower ( $ adapter ) ) ; if ( Zend_Loader :: isReadable ( 'Zend/Validate/Barcode/' . $ adapter . '.php' ) ) { $ adapter = 'Zend_Validate_Barcode_' . $ adapter ; } if ( ! class_exists ( $ adapter ) ) { Zend_Loader :: loadClass ( $ adapter ) ; } $ this -> _adapter = new $ adapter ( $ options ) ; if ( ! $ this -> _adapter instanceof Zend_Validate_Barcode_AdapterInterface ) { throw new Zend_Validate_Exception ( "Adapter " . $ adapter . " does not implement Zend_Validate_Barcode_AdapterInterface" ) ; } return $ this ; }
Sets a new barcode adapter

@param  string|Zend_Validate_Barcode $adapter Barcode adapter to use
@param  array  $options Options for this adapter
@return void
@throws Zend_Validate_Exception
Sets a new barcode adapter