<?php
/**
 * @var string $fullName
 * @var string $className
 * @var array $namespacePieces
 * @var \Zephir\Class\Definition\Definition $classDefinition
 * @var Zephir\CompilerFile $compilerFile
 */

$items = [
    ['name' => 'Classes' , 'url' => '/classes.html'],
    $items[] = ['name' => $fullName , 'url' => $this->url($classDefinition)],
    $items[] = ['name' => 'Source'],
];
?>

<?= $this->partial('partials/breadcrumb.phtml', ['items'=> $items]) ?>

<div class="class-header source clearfix">

    <div class="access-buttons">
        <a class="zep-button" href="<?= $this->url($classDefinition) ?>">Class</a>

        <?php if ($this->themeOption('github')): ?>
        <a class="zep-button"
           href="<?= rtrim($this->themeOption('github'), '/') . '/tree/master/' . $compilerFile->getFilePath() ?>">
            Github
        </a>
        <?php endif; ?>
    </div>

    <div class="class-full-name">
        <span class="class-type">Class</span>

        <?php foreach ($namespacePieces as $nsname => $nspath): ?>
        <span class="namespace-piece">
            <a href="<?= $this->url(Zephir\Documentation::namespaceUrl($nspath)) ?>"><?=$nsname?></a>
        </span>
        <?php endforeach; ?>

        <h1 class="class-name"><?= $className ?></h1>
    </div>

</div>

<pre class="zephir-source-file prettyprint linenums">
    <?= file_get_contents(realpath($compilerFile->getFilePath())) ?>
</pre>
