Carsten Brandt
11 years ago
24 changed files with 451 additions and 47 deletions
@ -0,0 +1,34 @@ |
|||||||
|
<?php |
||||||
|
|
||||||
|
use yii\apidoc\models\ClassDoc; |
||||||
|
/** |
||||||
|
* @var ClassDoc $type |
||||||
|
* @var yii\web\View $this |
||||||
|
*/ |
||||||
|
|
||||||
|
$events = $type->getNativeEvents(); |
||||||
|
if (empty($events)) { |
||||||
|
return; |
||||||
|
} ?> |
||||||
|
<h2>Event Details</h2> |
||||||
|
<?php foreach($events as $event): ?> |
||||||
|
<div class="detailHeader" id="<?= $event->name.'-detail' ?>">
|
||||||
|
<?php echo $event->name; ?> |
||||||
|
<span class="detailHeaderTag"> |
||||||
|
event |
||||||
|
<?php if(!empty($event->since)): ?> |
||||||
|
(available since version <?= $event->since ?>)
|
||||||
|
<?php endif; ?> |
||||||
|
</span> |
||||||
|
</div> |
||||||
|
|
||||||
|
<?php /* |
||||||
|
<div class="signature"> |
||||||
|
<?php echo $event->trigger->signature; ?> |
||||||
|
</div>*/ ?> |
||||||
|
|
||||||
|
<p><?php echo $event->description; ?></p>
|
||||||
|
|
||||||
|
<?= $this->render('seeAlso', ['object' => $event]); ?> |
||||||
|
|
||||||
|
<?php endforeach; ?> |
@ -0,0 +1,59 @@ |
|||||||
|
<?php |
||||||
|
|
||||||
|
use yii\apidoc\models\ClassDoc; |
||||||
|
use yii\apidoc\models\TraitDoc; |
||||||
|
/** |
||||||
|
* @var ClassDoc|TraitDoc $type |
||||||
|
* @var yii\web\View $this |
||||||
|
*/ |
||||||
|
|
||||||
|
$methods = $type->getNativeMethods(); |
||||||
|
if (empty($methods)) { |
||||||
|
return; |
||||||
|
} ?> |
||||||
|
<h2>Method Details</h2> |
||||||
|
|
||||||
|
<?php foreach($methods as $method): ?> |
||||||
|
|
||||||
|
<div class="detailHeader" id="<?= $method->name . '()-detail' ?>">
|
||||||
|
<?= $method->name ?>()
|
||||||
|
<span class="detailHeaderTag"> |
||||||
|
method |
||||||
|
<?php if (!empty($method->since)): ?> |
||||||
|
(available since version <?php echo $method->since; ?>)
|
||||||
|
<?php endif; ?> |
||||||
|
</span> |
||||||
|
</div> |
||||||
|
|
||||||
|
<table class="summaryTable"> |
||||||
|
<tr><td colspan="3"> |
||||||
|
<div class="signature2"> |
||||||
|
<?= $this->context->renderMethodSignature($method) ?> |
||||||
|
</div> |
||||||
|
</td></tr> |
||||||
|
<?php if(!empty($method->params) || !empty($method->return)): ?> |
||||||
|
<?php foreach($method->params as $param): ?> |
||||||
|
<tr> |
||||||
|
<td class="paramNameCol"><?= $param->name ?></td>
|
||||||
|
<td class="paramTypeCol"><?= $this->context->typeLink($param->types) ?></td>
|
||||||
|
<td class="paramDescCol"><?= $param->description ?></td>
|
||||||
|
</tr> |
||||||
|
<?php endforeach; ?> |
||||||
|
<?php if(!empty($method->return)): ?> |
||||||
|
<tr> |
||||||
|
<td class="paramNameCol"><?= '{return}'; ?></td>
|
||||||
|
<td class="paramTypeCol"><?= $this->context->typeLink($method->returnTypes); ?></td>
|
||||||
|
<td class="paramDescCol"><?= $method->return; ?></td>
|
||||||
|
</tr> |
||||||
|
<?php endif; ?> |
||||||
|
<?php endif; ?> |
||||||
|
</table> |
||||||
|
|
||||||
|
<!-- --><?php //$this->renderPartial('sourceCode',array('object'=>$method)); ?>
|
||||||
|
|
||||||
|
<p><strong><?= $method->shortDescription ?></strong></p>
|
||||||
|
<p><?= nl2br($method->description) ?></p>
|
||||||
|
|
||||||
|
<?= $this->render('seeAlso', ['object' => $method]); ?> |
||||||
|
|
||||||
|
<?php endforeach; ?> |
@ -0,0 +1,38 @@ |
|||||||
|
<?php |
||||||
|
|
||||||
|
use yii\apidoc\models\ClassDoc; |
||||||
|
use yii\apidoc\models\TraitDoc; |
||||||
|
/** |
||||||
|
* @var ClassDoc|TraitDoc $type |
||||||
|
* @var yii\web\View $this |
||||||
|
*/ |
||||||
|
|
||||||
|
$properties = $type->getNativeProperties(); |
||||||
|
if (empty($properties)) { |
||||||
|
return; |
||||||
|
} ?> |
||||||
|
<h2>Property Details</h2> |
||||||
|
|
||||||
|
<?php foreach($properties as $property): ?> |
||||||
|
|
||||||
|
<div class="detailHeader" id="<?= $property->name.'-detail' ?>">
|
||||||
|
<?php echo $property->name; ?> |
||||||
|
<span class="detailHeaderTag"> |
||||||
|
property |
||||||
|
<?php if($property->getIsReadOnly()) echo ' <em>read-only</em> '; ?> |
||||||
|
<?php if($property->getIsWriteOnly()) echo ' <em>write-only</em> '; ?> |
||||||
|
<?php if(!empty($property->since)): ?> |
||||||
|
(available since version <?php echo $property->since; ?>)
|
||||||
|
<?php endif; ?> |
||||||
|
</span> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="signature"> |
||||||
|
<?php echo $this->context->renderPropertySignature($property); ?> |
||||||
|
</div> |
||||||
|
|
||||||
|
<p><?= nl2br($property->description) ?></p>
|
||||||
|
|
||||||
|
<?= $this->render('seeAlso', ['object' => $property]); ?> |
||||||
|
|
||||||
|
<?php endforeach; ?> |
@ -0,0 +1,26 @@ |
|||||||
|
<?php |
||||||
|
|
||||||
|
/** |
||||||
|
* @var yii\apidoc\models\BaseDoc $object |
||||||
|
* @var yii\web\View $this |
||||||
|
*/ |
||||||
|
|
||||||
|
$see = []; |
||||||
|
foreach($object->tags as $tag) { |
||||||
|
/** @var $tag phpDocumentor\Reflection\DocBlock\Tag\SeeTag */ |
||||||
|
if (get_class($tag) == 'phpDocumentor\Reflection\DocBlock\Tag\SeeTag') { |
||||||
|
$see[] = $tag->getReference(); |
||||||
|
} |
||||||
|
} |
||||||
|
if (empty($see)) { |
||||||
|
return; |
||||||
|
} |
||||||
|
?> |
||||||
|
<div class="SeeAlso"> |
||||||
|
<h4>See Also</h4> |
||||||
|
<ul> |
||||||
|
<?php foreach($see as $ref): ?> |
||||||
|
<li><?= $ref ?></li>
|
||||||
|
<?php endforeach; ?> |
||||||
|
</ul> |
||||||
|
</div> |
Loading…
Reference in new issue