Update vendors.

Former-commit-id: ad3284b1e77cfb0b17af99e0ddaf00618e4485b7
This commit is contained in:
John-David Dalton
2012-09-04 21:20:22 -07:00
parent ba948a38e9
commit 22d3794d22
13 changed files with 842 additions and 230 deletions

View File

@@ -221,22 +221,39 @@ class Generator {
foreach ($members as $member) {
// create api category arrays
if (!isset($api[$member]) && $member) {
// create temporary entry to be replaced later
$api[$member] = new Entry('', '', $entry->lang);
$api[$member]->static = array();
$api[$member]->plugin = array();
}
// append entry to api category
if (!$member || $entry->isCtor() || ($entry->getType() == 'Object' &&
!preg_match('/[=:]\s*null\s*[,;]?$/', $entry->entry))) {
// assign the real entry, replacing the temporary entry if it exist
$member = ($member ? $member . ($entry->isPlugin() ? '#' : '.') : '') . $name;
$entry->static = @$api[$member] ? $api[$member]->static : array();
$entry->plugin = @$api[$member] ? $api[$member]->plugin : array();
$api[$member] = $entry;
$api[$member] = $entry;
foreach ($entry->getAliases() as $alias) {
$api[$member] = $alias;
$alias->static = array();
$alias->plugin = array();
}
}
else if ($entry->isStatic()) {
$api[$member]->static[] = $entry;
} else if (!$entry->isCtor()) {
foreach ($entry->getAliases() as $alias) {
$api[$member]->static[] = $alias;
}
}
else if (!$entry->isCtor()) {
$api[$member]->plugin[] = $entry;
foreach ($entry->getAliases() as $alias) {
$api[$member]->plugin[] = $alias;
}
}
}
}
@@ -346,6 +363,11 @@ class Generator {
$result[] = $openTag;
foreach ($api as $entry) {
// skip aliases
if ($entry->isAlias()) {
continue;
}
// add root entry
$member = $entry->member . $entry->getName();
$compiling = $compiling ? ($result[] = $closeTag) : true;
@@ -370,6 +392,11 @@ class Generator {
// body
foreach ($subentries as $subentry) {
// skip aliases
if ($subentry->isAlias()) {
continue;
}
// description
array_push(
$result,
@@ -377,6 +404,14 @@ class Generator {
Generator::interpolate("### <a id=\"#{hash}\"></a>`#{member}#{separator}#{call}`\n<a href=\"##{hash}\">#</a> [&#x24C8;](#{href} \"View in source\") [&#x24C9;][1]\n\n#{desc}", $subentry)
);
// @alias
if (count($aliases = $subentry->getAliases())) {
array_push($result, '', '#### Aliases');
foreach ($aliases as $index => $alias) {
$aliases[$index] = $alias->getName();
}
$result[] = implode(', ', $aliases);
}
// @param
if (count($params = $subentry->getParams())) {
array_push($result, '', '#### Arguments');