private static function getRequiredAttribute(
            $entity,
            string $name,
            string $method
    ) {
        if (!method_exists($entity, $method)) {
            throw new XmlException(
                    'RSSFeedItem ' . get_class($entity)
                    . ' does not offer a method named "' . $method
                    . '" to return the ' . $name . ', but ' . $name
                    . ' is required.'
            );
        }

        return $entity->$method();
    }
private static function getRequiredAttribute(
            $entity,
            string $name,
            string $method
    ) {
        if (!method_exists($entity, $method)) {
            throw new XmlException(
                    'RSSFeedItem ' . get_class($entity)
                    . ' does not offer a method named "' . $method
                    . '" to return the ' . $name . ', but ' . $name
                    . ' is required.'
            );
        }

        return $entity->$method();
    }
private static function getRequiredAttribute ( $ entity , string $ name , string $ method ) { if ( ! method_exists ( $ entity , $ method ) ) { throw new XmlException ( 'RSSFeedItem ' . get_class ( $ entity ) . ' does not offer a method named "' . $ method . '" to return the ' . $ name . ', but ' . $ name . ' is required.' ) ; } return $ entity -> $ method ( ) ; }
helper method to retrieve a required attribute

@param   object            $entity
@param   string            $name
@param   string            $method
@return  string
@throws  \stubbles\xml\XmlException
helper method to retrieve a required attribute