* @since 2.0.5 */ class ApiRenderer extends BaseApiRenderer implements ViewContextInterface { /** * Writes a given [[Context]] as JSON text to file 'types.json'. * * @param Context $context the api documentation context to render. * @param $targetDir */ public function render($context, $targetDir) { $types = array_merge($context->classes, $context->interfaces, $context->traits); file_put_contents($targetDir . '/types.json', json_encode($types, JSON_PRETTY_PRINT)); } /** * @inheritdoc */ public function generateApiUrl($typeName) { } /** * @inheritdoc */ protected function generateFileName($typeName) { } /** * @inheritdoc */ public function getViewPath() { } /** * @inheritdoc */ protected function generateLink($text, $href, $options = []) { } /** * @inheritdoc */ public function getSourceUrl($type, $line = null) { } }