History

Update and improve PHP documentation (5.6.6)

Fixes #162.

Thibaut committed 11 years ago

Commit c3e41d71 parent cf9e5495 files · +14 −7Browse files

Unified · Split

5 files
  1. assets/javascripts/views/pages/php.coffee +6 −0
  2. assets/stylesheets/pages/_php.scss +0 −2
  3. lib/docs/filters/php/clean_html.rb +5 −2
  4. lib/docs/filters/php/entries.rb +1 −1
  5. lib/docs/scrapers/php.rb +2 −2
assets/javascripts/views/pages/php.coffee+6−0
@@ -0,0 +1,6 @@
1+#= require views/pages/base
2+
3+class app.views.PhpPage extends app.views.BasePage
4+ afterRender: ->
5+ @highlightCode @findAllByClass('phpcode'), 'php'
6+ return
assets/stylesheets/pages/_php.scss+0−2
@@ -23,8 +23,6 @@ · 22 unmodified lines
2323 .classsynopsis > .methodsynopsis,
2424 .classsynopsis > .fieldsynopsis { margin-left: 1em; }
2525
26− .phpcode > pre { white-space: normal; }
27−
2826 blockquote.note { @extend %note; }
2927 blockquote.note > p { margin-bottom: 0; }
3028
lib/docs/filters/php/clean_html.rb+5−2
@@ -18,9 +18,12 @@ module Docs · 17 unmodified lines
1818 @doc = doc.first_element_child
1919 end
2020
21− # Put code blocks in <pre> tags
22− css('.phpcode > code').each do |node|
21+ # Remove code highlighting
22+ br = /<br\s?\/?>/i
23+ css('.phpcode').each do |node|
2324 node.name = 'pre'
25+ node.inner_html = node.inner_html.gsub(br, "\n")
26+ node.content = node.content
2427 end
2528 end
2629 end
lib/docs/filters/php/entries.rb+1−1
@@ -27,7 +27,7 @@ module Docs · 26 unmodified lines
2727 'XsltProcessor' => 'XSLT',
2828 'ZipArchive' => 'Zip' }
2929
30− %w(APC Directory DOM Gearman Gmagick Imagick mysqli OAuth PDO Reflection
30+ %w(APC Directory DOM Event Gearman Gmagick Imagick mysqli OAuth PDO Reflection
3131 Session SimpleXML Solr Sphinx SQLite3 Varnish XSLT Yaf).each do |str|
3232 TYPE_BY_NAME_STARTS_WITH[str] = str
3333 end
lib/docs/scrapers/php.rb+2−2
@@ -2,7 +2,7 @@ module Docs · 1 unmodified line
22 class Php < FileScraper
33 self.name = 'PHP'
44 self.type = 'php'
5− self.version = 'up to 5.6.5'
5+ self.version = 'up to 5.6.6'
66 self.base_url = 'http://www.php.net/manual/en/'
77 self.root_path = 'index.html'
88 self.initial_paths = %w(
@@ -33,7 +33,7 @@ module Docs · 24 unmodified lines
3333 /\Areserved\.variables/]
3434
3535 BOOKS = %w(apache apc array bc bzip2 calendar classobj ctype curl datetime
36− dba dir dom eio errorfunc exec fileinfo filesystem filter ftp funchand
36+ dba dir dom eio errorfunc event exec fileinfo filesystem filter ftp funchand
3737 gearman geoip gettext gmagick hash http iconv iisfunc image imagick imap
3838 info inotify intl json ldap libevent libxml mail mailparse math mbstring
3939 mcrypt memcached misc mysqli network oauth openssl outcontrol password