Update and improve PHP documentation (5.6.6)

Fixes #162.
This commit is contained in:
Thibaut 2015-02-21 11:49:42 -05:00
parent cf9e549fd8
commit c3e41d792a
5 changed files with 14 additions and 7 deletions

View file

@ -0,0 +1,6 @@
#= require views/pages/base
class app.views.PhpPage extends app.views.BasePage
afterRender: ->
@highlightCode @findAllByClass('phpcode'), 'php'
return

View file

@ -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; }

View file

@ -18,9 +18,12 @@ module Docs
@doc = doc.first_element_child
end
# Put code blocks in <pre> tags
css('.phpcode > code').each do |node|
# Remove code highlighting
br = /<br\s?\/?>/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

View file

@ -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

View file

@ -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