فهرست منبع

Update PHP documentation (up to 7.0.7)

Thibaut Courouble 9 سال پیش
والد
کامیت
ceccfc0951

+ 0 - 6
assets/javascripts/views/pages/php.coffee

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

+ 1 - 0
assets/javascripts/views/pages/simple.coffee

@@ -23,6 +23,7 @@ app.views.NodePage =
 app.views.PerlPage =
 app.views.PhalconPage =
 app.views.PhaserPage =
+app.views.PhpPage =
 app.views.PostgresPage =
 app.views.RamdaPage =
 app.views.ReactPage =

+ 1 - 0
lib/docs/filters/php/clean_html.rb

@@ -24,6 +24,7 @@ module Docs
           node.name = 'pre'
           node.inner_html = node.inner_html.gsub(br, "\n")
           node.content = node.content
+          node['data-language'] = 'php'
         end
 
         css('> h2:first-child.title').each do |node|

+ 1 - 1
lib/docs/filters/php/entries.rb

@@ -94,7 +94,7 @@ module Docs
       end
 
       def get_type
-        return 'Language Reference' if subpath.start_with?('language.')
+        return 'Language Reference' if subpath.start_with?('language.') || subpath.start_with?('functions.')
         return 'PCRE Reference' if subpath.start_with?('regexp.')
 
         type = at_css('.up').content.strip

+ 2 - 2
lib/docs/scrapers/php.rb

@@ -4,7 +4,7 @@ module Docs
 
     self.name = 'PHP'
     self.type = 'php'
-    self.release = 'up to 7.0.5'
+    self.release = 'up to 7.0.7'
     self.base_url = 'https://secure.php.net/manual/en/'
     self.root_path = 'index.html'
     self.initial_paths = %w(
@@ -36,7 +36,7 @@ module Docs
     options[:only_patterns] = [
       /\Alanguage\./,
       /\Aclass\./,
-      /\Afunction\./,
+      /\Afunctions?\./,
       /\Acontrol-structures/,
       /\Aregexp\./,
       /\Areserved\.exceptions/,