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
3class 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
23 .classsynopsis > .methodsynopsis,23 .classsynopsis > .methodsynopsis,
24 .classsynopsis > .fieldsynopsis { margin-left: 1em; }24 .classsynopsis > .fieldsynopsis { margin-left: 1em; }
25 25
26 .phpcode > pre { white-space: normal; }
27
28 blockquote.note { @extend %note; }26 blockquote.note { @extend %note; }
29 blockquote.note > p { margin-bottom: 0; }27 blockquote.note > p { margin-bottom: 0; }
30 28
lib/docs/filters/php/clean_html.rb+5−2
@@ -18,9 +18,12 @@ module Docs · 17 unmodified lines
18 @doc = doc.first_element_child18 @doc = doc.first_element_child
19 end19 end
20 20
21 # Put code blocks in <pre> tags21 # Remove code highlighting
22 css('.phpcode > code').each do |node|22 br = /<br\s?\/?>/i
23 css('.phpcode').each do |node|
23 node.name = 'pre'24 node.name = 'pre'
25 node.inner_html = node.inner_html.gsub(br, "\n")
26 node.content = node.content
24 end27 end
25 end28 end
26 end29 end
lib/docs/filters/php/entries.rb+1−1
@@ -27,7 +27,7 @@ module Docs · 26 unmodified lines
27 'XsltProcessor' => 'XSLT',27 'XsltProcessor' => 'XSLT',
28 'ZipArchive' => 'Zip' }28 'ZipArchive' => 'Zip' }
29 29
30 %w(APC Directory DOM Gearman Gmagick Imagick mysqli OAuth PDO Reflection30 %w(APC Directory DOM Event Gearman Gmagick Imagick mysqli OAuth PDO Reflection
31 Session SimpleXML Solr Sphinx SQLite3 Varnish XSLT Yaf).each do |str|31 Session SimpleXML Solr Sphinx SQLite3 Varnish XSLT Yaf).each do |str|
32 TYPE_BY_NAME_STARTS_WITH[str] = str32 TYPE_BY_NAME_STARTS_WITH[str] = str
33 end33 end
lib/docs/scrapers/php.rb+2−2
@@ -2,7 +2,7 @@ module Docs · 1 unmodified line
2 class Php < FileScraper2 class Php < FileScraper
3 self.name = 'PHP'3 self.name = 'PHP'
4 self.type = 'php'4 self.type = 'php'
5 self.version = 'up to 5.6.5'5 self.version = 'up to 5.6.6'
6 self.base_url = 'http://www.php.net/manual/en/'6 self.base_url = 'http://www.php.net/manual/en/'
7 self.root_path = 'index.html'7 self.root_path = 'index.html'
8 self.initial_paths = %w(8 self.initial_paths = %w(
@@ -33,7 +33,7 @@ module Docs · 24 unmodified lines
33 /\Areserved\.variables/]33 /\Areserved\.variables/]
34 34
35 BOOKS = %w(apache apc array bc bzip2 calendar classobj ctype curl datetime35 BOOKS = %w(apache apc array bc bzip2 calendar classobj ctype curl datetime
36 dba dir dom eio errorfunc exec fileinfo filesystem filter ftp funchand36 dba dir dom eio errorfunc event exec fileinfo filesystem filter ftp funchand
37 gearman geoip gettext gmagick hash http iconv iisfunc image imagick imap37 gearman geoip gettext gmagick hash http iconv iisfunc image imagick imap
38 info inotify intl json ldap libevent libxml mail mailparse math mbstring38 info inotify intl json ldap libevent libxml mail mailparse math mbstring
39 mcrypt memcached misc mysqli network oauth openssl outcontrol password39 mcrypt memcached misc mysqli network oauth openssl outcontrol password