src/EmailStripper/EmailStripper.php
public function addStripper($stripper)
    {
        if (is_string($stripper)) {
            if (!class_exists($stripper)) {
                $stripper = '\\' . __NAMESPACE__ . '\\Stripper\\' . $stripper;
                if (!class_exists($stripper)) {
                    throw new \InvalidArgumentException('Class ' . $stripper . ' can not be found');
                }
            }

            $stripper = new $stripper;
            if (!$stripper instanceof StripperInterface) {
                throw new InvalidArgumentException('Class "' . get_class($stripper) . '" must implement StripperInterface');
            }

        } elseif (!$stripper instanceof StripperInterface) {
            throw new InvalidArgumentException('Class "' . get_class($stripper) . '" must implement StripperInterface');
        }

        $this->_stippers[] = $stripper;
    }
public function addStripper($stripper)
    {
        if (is_string($stripper)) {
            if (!class_exists($stripper)) {
                $stripper = '\\' . __NAMESPACE__ . '\\Stripper\\' . $stripper;
                if (!class_exists($stripper)) {
                    throw new \InvalidArgumentException('Class ' . $stripper . ' can not be found');
                }
            }

            $stripper = new $stripper;
            if (!$stripper instanceof StripperInterface) {
                throw new InvalidArgumentException('Class "' . get_class($stripper) . '" must implement StripperInterface');
            }

        } elseif (!$stripper instanceof StripperInterface) {
            throw new InvalidArgumentException('Class "' . get_class($stripper) . '" must implement StripperInterface');
        }

        $this->_stippers[] = $stripper;
    }
public function addStripper ( $ stripper ) { if ( is_string ( $ stripper ) ) { if ( ! class_exists ( $ stripper ) ) { $ stripper = '\\' . __NAMESPACE__ . '\\Stripper\\' . $ stripper ; if ( ! class_exists ( $ stripper ) ) { throw new \ InvalidArgumentException ( 'Class ' . $ stripper . ' can not be found' ) ; } } $ stripper = new $ stripper ; if ( ! $ stripper instanceof StripperInterface ) { throw new InvalidArgumentException ( 'Class "' . get_class ( $ stripper ) . '" must implement StripperInterface' ) ; } } elseif ( ! $ stripper instanceof StripperInterface ) { throw new InvalidArgumentException ( 'Class "' . get_class ( $ stripper ) . '" must implement StripperInterface' ) ; } $ this -> _stippers [ ] = $ stripper ; }
Accept an object or class name that implements StripperInterface

@param string|StripperInterface $stripper
Accept an object or class name that implements StripperInterface