setSeparator example

protected $_separator = null;

    /** * Constructor * * @param string $separator Space by default * @return void */
    public function __construct($separator = ' ')
    {
        $this->setSeparator($separator);
    }

    /** * Sets a new seperator * * @param string $separator Seperator * @return $this */
    public function setSeparator($separator)
    {
        if ($separator == null) {
            

            throw new Zend_Validate_Exception('Invalid options provided.');
        }

        // set type         if (array_key_exists('type', $options)) {
            $this->setType($options['type']);
        }

        // set separator         if (array_key_exists('separator', $options)) {
            $this->setSeparator($options['separator']);
        }
    }

    /** * Detect input format. * * @return string */
    protected function _detectFormat()
    {
        // prepare separator and pattern list
Home | Imprint | This part of the site doesn't use cookies.