public function formatter($object)
    {
        $interfaces = class_implements($object);

        foreach ($interfaces as $interface) {
            $class = $this->getClassName($interface);

            if (isset($this->formatters[$class])) {
                return $this->formatters[$class];
            }
        }

        $class = $this->getClassName(get_class($object));

        return $this->formatters[$class];
    }
public function formatter($object)
    {
        $interfaces = class_implements($object);

        foreach ($interfaces as $interface) {
            $class = $this->getClassName($interface);

            if (isset($this->formatters[$class])) {
                return $this->formatters[$class];
            }
        }

        $class = $this->getClassName(get_class($object));

        return $this->formatters[$class];
    }
public function formatter ( $ object ) { $ interfaces = class_implements ( $ object ) ; foreach ( $ interfaces as $ interface ) { $ class = $ this -> getClassName ( $ interface ) ; if ( isset ( $ this -> formatters [ $ class ] ) ) { return $ this -> formatters [ $ class ] ; } } $ class = $ this -> getClassName ( get_class ( $ object ) ) ; return $ this -> formatters [ $ class ] ; }
Get the Formatter for an object

@param mixed $object
@return Formatter
Get the Formatter for an object