diff --git a/assets/javascripts/views/pages/php.coffee b/assets/javascripts/views/pages/php.coffee new file mode 100644 index 00000000..8129bedc --- /dev/null +++ b/assets/javascripts/views/pages/php.coffee @@ -0,0 +1,6 @@ +#= require views/pages/base + +class app.views.PhpPage extends app.views.BasePage + afterRender: -> + @highlightCode @findAllByClass('phpcode'), 'php' + return diff --git a/assets/stylesheets/pages/_php.scss b/assets/stylesheets/pages/_php.scss index 7ea8d4d4..4386bd57 100644 --- a/assets/stylesheets/pages/_php.scss +++ b/assets/stylesheets/pages/_php.scss @@ -23,8 +23,6 @@ .classsynopsis > .methodsynopsis, .classsynopsis > .fieldsynopsis { margin-left: 1em; } - .phpcode > pre { white-space: normal; } - blockquote.note { @extend %note; } blockquote.note > p { margin-bottom: 0; } diff --git a/lib/docs/filters/php/clean_html.rb b/lib/docs/filters/php/clean_html.rb index 24c02a64..3d89418c 100644 --- a/lib/docs/filters/php/clean_html.rb +++ b/lib/docs/filters/php/clean_html.rb @@ -18,9 +18,12 @@ module Docs @doc = doc.first_element_child end - # Put code blocks in
 tags
-        css('.phpcode > code').each do |node|
+        # Remove code highlighting
+        br = //i
+        css('.phpcode').each do |node|
           node.name = 'pre'
+          node.inner_html = node.inner_html.gsub(br, "\n")
+          node.content = node.content
         end
       end
     end
diff --git a/lib/docs/filters/php/entries.rb b/lib/docs/filters/php/entries.rb
index 08eade8b..090210e7 100644
--- a/lib/docs/filters/php/entries.rb
+++ b/lib/docs/filters/php/entries.rb
@@ -27,7 +27,7 @@ module Docs
         'XsltProcessor'   => 'XSLT',
         'ZipArchive'      => 'Zip' }
 
-      %w(APC Directory DOM Gearman Gmagick Imagick mysqli OAuth PDO Reflection
+      %w(APC Directory DOM Event Gearman Gmagick Imagick mysqli OAuth PDO Reflection
         Session SimpleXML Solr Sphinx SQLite3 Varnish XSLT Yaf).each do |str|
         TYPE_BY_NAME_STARTS_WITH[str] = str
       end
diff --git a/lib/docs/scrapers/php.rb b/lib/docs/scrapers/php.rb
index bcc1eab3..2f2be097 100644
--- a/lib/docs/scrapers/php.rb
+++ b/lib/docs/scrapers/php.rb
@@ -2,7 +2,7 @@ module Docs
   class Php < FileScraper
     self.name = 'PHP'
     self.type = 'php'
-    self.version = 'up to 5.6.5'
+    self.version = 'up to 5.6.6'
     self.base_url = 'http://www.php.net/manual/en/'
     self.root_path = 'index.html'
     self.initial_paths = %w(
@@ -33,7 +33,7 @@ module Docs
       /\Areserved\.variables/]
 
     BOOKS = %w(apache apc array bc bzip2 calendar classobj ctype curl datetime
-      dba dir dom eio errorfunc exec fileinfo filesystem filter ftp funchand
+      dba dir dom eio errorfunc event exec fileinfo filesystem filter ftp funchand
       gearman geoip gettext gmagick hash http iconv iisfunc image imagick imap
       info inotify intl json ldap libevent libxml mail mailparse math mbstring
       mcrypt memcached misc mysqli network oauth openssl outcontrol password