From: Antonio Ospite Date: Tue, 17 May 2016 21:04:48 +0000 (+0200) Subject: Fix naming conventions for the generate_enclosure functon X-Git-Tag: v0.6~39 X-Git-Url: https://git.ao2.it/tweeper.git/commitdiff_plain/3af52fa729dd3790dcd6512b5c1e7c7226e41331 Fix naming conventions for the generate_enclosure functon Use lowerCamel case for the function name, keep snake_case for the local variable in the php code, and use a dash-separated case for the xsl variable. --- diff --git a/rss_converter_instagram.com.xsl b/rss_converter_instagram.com.xsl index aaab2e8..c4fda61 100644 --- a/rss_converter_instagram.com.xsl +++ b/rss_converter_instagram.com.xsl @@ -24,7 +24,7 @@ xsl:extension-element-prefixes="php" exclude-result-prefixes="php"> - + @@ -33,7 +33,7 @@ - + @@ -92,7 +92,7 @@ ]]> - + diff --git a/rss_converter_twitter.com.xsl b/rss_converter_twitter.com.xsl index 929f8b2..991d525 100644 --- a/rss_converter_twitter.com.xsl +++ b/rss_converter_twitter.com.xsl @@ -24,7 +24,7 @@ xsl:extension-element-prefixes="php" exclude-result-prefixes="php"> - + @@ -33,7 +33,7 @@ - + @@ -62,7 +62,7 @@ ]]> - + diff --git a/tweeper.php b/tweeper.php index 27be95d..f712c87 100644 --- a/tweeper.php +++ b/tweeper.php @@ -110,7 +110,7 @@ class Tweeper { /** * Generate an RSS element. */ - public static function generate_enclosure($url) { + public static function generateEnclosure($url) { $supported_content_types = array( "application/ogg", "audio/aac", @@ -203,7 +203,7 @@ class Tweeper { $xsltProcessor = new XSLTProcessor(); $xsltProcessor->registerPHPFunctions(); - $xsltProcessor->setParameter('', 'generateEnclosure', $this->generate_enclosure); + $xsltProcessor->setParameter('', 'generate-enclosure', $this->generate_enclosure); $xsltProcessor->importStylesheet($xslDoc); return $xsltProcessor;