|
|
@ -7,6 +7,7 @@ module Docs
|
|
|
|
'Cond' => 'pthreads',
|
|
|
|
'Cond' => 'pthreads',
|
|
|
|
'CURL' => 'cURL',
|
|
|
|
'CURL' => 'cURL',
|
|
|
|
'Date' => 'Date/Time',
|
|
|
|
'Date' => 'Date/Time',
|
|
|
|
|
|
|
|
'Ds' => 'Data Structures',
|
|
|
|
'ErrorException' => 'Predefined Exceptions',
|
|
|
|
'ErrorException' => 'Predefined Exceptions',
|
|
|
|
'Exception' => 'Predefined Exceptions',
|
|
|
|
'Exception' => 'Predefined Exceptions',
|
|
|
|
'Json' => 'JSON',
|
|
|
|
'Json' => 'JSON',
|
|
|
@ -14,6 +15,7 @@ module Docs
|
|
|
|
'Mutex' => 'pthreads',
|
|
|
|
'Mutex' => 'pthreads',
|
|
|
|
'php_user_filter' => 'Stream',
|
|
|
|
'php_user_filter' => 'Stream',
|
|
|
|
'Pool' => 'pthreads',
|
|
|
|
'Pool' => 'pthreads',
|
|
|
|
|
|
|
|
'QuickHash' => 'Quickhash',
|
|
|
|
'Reflector' => 'Reflection',
|
|
|
|
'Reflector' => 'Reflection',
|
|
|
|
'Soap' => 'SOAP',
|
|
|
|
'Soap' => 'SOAP',
|
|
|
|
'SplFile' => 'SPL/File',
|
|
|
|
'SplFile' => 'SPL/File',
|
|
|
@ -24,6 +26,7 @@ module Docs
|
|
|
|
'streamWrapper' => 'Stream',
|
|
|
|
'streamWrapper' => 'Stream',
|
|
|
|
'Thread' => 'pthreads',
|
|
|
|
'Thread' => 'pthreads',
|
|
|
|
'tidy' => 'Tidy',
|
|
|
|
'tidy' => 'Tidy',
|
|
|
|
|
|
|
|
'Weak' => 'Weakref',
|
|
|
|
'Worker' => 'pthreads',
|
|
|
|
'Worker' => 'pthreads',
|
|
|
|
'XsltProcessor' => 'XSLT',
|
|
|
|
'XsltProcessor' => 'XSLT',
|
|
|
|
'Yar' => 'Yar',
|
|
|
|
'Yar' => 'Yar',
|
|
|
@ -48,8 +51,10 @@ module Docs
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
REPLACE_TYPES = {
|
|
|
|
REPLACE_TYPES = {
|
|
|
|
|
|
|
|
'APCu' => 'APC',
|
|
|
|
'Error' => 'Errors',
|
|
|
|
'Error' => 'Errors',
|
|
|
|
'Exceptions' => 'SPL/Exceptions',
|
|
|
|
'Exceptions' => 'SPL/Exceptions',
|
|
|
|
|
|
|
|
'Exif' => 'Image/Exif',
|
|
|
|
'finfo' => 'File System',
|
|
|
|
'finfo' => 'File System',
|
|
|
|
'GD and Image' => 'Image',
|
|
|
|
'GD and Image' => 'Image',
|
|
|
|
'Gmagick' => 'Image/GraphicsMagick',
|
|
|
|
'Gmagick' => 'Image/GraphicsMagick',
|
|
|
@ -74,7 +79,7 @@ module Docs
|
|
|
|
'Database' => ['DBA', 'ODBC', 'PDO'],
|
|
|
|
'Database' => ['DBA', 'ODBC', 'PDO'],
|
|
|
|
'Date and Time' => ['Calendar', 'Date/Time'],
|
|
|
|
'Date and Time' => ['Calendar', 'Date/Time'],
|
|
|
|
'Errors' => ['Error Handling', 'Predefined Exceptions'],
|
|
|
|
'Errors' => ['Error Handling', 'Predefined Exceptions'],
|
|
|
|
'File System' => ['Directory', 'Fileinfo', 'Filesystem', 'Inotify'],
|
|
|
|
'File System' => ['Directory', 'Fileinfo', 'Filesystem', 'Inotify', 'Proctitle'],
|
|
|
|
'HTML' => ['DOM', 'Tidy'],
|
|
|
|
'HTML' => ['DOM', 'Tidy'],
|
|
|
|
'Language' => ['Control Structures', 'Misc.', 'PHP Options/Info', 'Predefined Variables'],
|
|
|
|
'Language' => ['Control Structures', 'Misc.', 'PHP Options/Info', 'Predefined Variables'],
|
|
|
|
'Mail' => ['Mail', 'Mailparse'],
|
|
|
|
'Mail' => ['Mail', 'Mailparse'],
|
|
|
@ -116,6 +121,47 @@ module Docs
|
|
|
|
REPLACE_TYPES[type] || type
|
|
|
|
REPLACE_TYPES[type] || type
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ALIASES = {
|
|
|
|
|
|
|
|
'language.oop5.traits' => ['trait'],
|
|
|
|
|
|
|
|
'language.operators.type' => ['instanceof'],
|
|
|
|
|
|
|
|
'functions.user-defined' => ['function'],
|
|
|
|
|
|
|
|
'language.oop5.visibility' => ['public', 'private', 'protected'],
|
|
|
|
|
|
|
|
'language.references.whatdo' => ['=&'],
|
|
|
|
|
|
|
|
'language.oop5.static' => ['static'],
|
|
|
|
|
|
|
|
'language.oop5.interfaces' => ['interface', 'implements'],
|
|
|
|
|
|
|
|
'language.oop5.inheritance' => ['extends'],
|
|
|
|
|
|
|
|
'language.oop5.cloning' => ['clone', '__clone()'],
|
|
|
|
|
|
|
|
'language.operators.logical' => ['and', 'or', 'xor'],
|
|
|
|
|
|
|
|
'language.operators.increment' => ['++', '--'],
|
|
|
|
|
|
|
|
'language.generators.syntax' => ['yield'],
|
|
|
|
|
|
|
|
'language.oop5.final' => ['final'],
|
|
|
|
|
|
|
|
'language.exceptions' => ['try', 'catch', 'finally'],
|
|
|
|
|
|
|
|
'language.oop5.decon' => ['__construct()', '__destruct()'],
|
|
|
|
|
|
|
|
'language.operators.comparison' => ['==', '===', '!=', '<>', '!==', '<=>'],
|
|
|
|
|
|
|
|
'language.oop5.abstract' => ['abstract'],
|
|
|
|
|
|
|
|
'language.operators.bitwise' => ['&', '|', '^', '~', '<<', '>>']
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def additional_entries
|
|
|
|
|
|
|
|
if aliases = ALIASES[slug]
|
|
|
|
|
|
|
|
aliases.map { |a| [a] }
|
|
|
|
|
|
|
|
elsif slug == 'language.constants.predefined'
|
|
|
|
|
|
|
|
css('table tr[id]').map do |node|
|
|
|
|
|
|
|
|
[node.at_css('code').content, node['id']]
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
elsif slug == 'language.oop5.magic'
|
|
|
|
|
|
|
|
css('h3 a').map do |node|
|
|
|
|
|
|
|
|
[node.content, node['href'][/#(.+)/, 1]]
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
elsif slug == 'language.oop5.overloading'
|
|
|
|
|
|
|
|
css('.methodsynopsis[id]').map do |node|
|
|
|
|
|
|
|
|
[node.at_css('.methodname').content + '()', node['id']]
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
[]
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
def include_default_entry?
|
|
|
|
def include_default_entry?
|
|
|
|
!initial_page? && doc.at_css('.reference', '.refentry', '.sect1', '.simpara', '.para')
|
|
|
|
!initial_page? && doc.at_css('.reference', '.refentry', '.sect1', '.simpara', '.para')
|
|
|
|
end
|
|
|
|
end
|
|
|
|