1<?php 2/** 3 * This file is part of phpDocumentor. 4 * 5 * For the full copyright and license information, please view the LICENSE 6 * file that was distributed with this source code. 7 * 8 * @copyright 2010-2015 Mike van Riel<mike@phpdoc.org> 9 * @license http://www.opensource.org/licenses/mit-license.php MIT 10 * @link http://phpdoc.org 11 */ 12 13namespace phpDocumentor\Reflection\DocBlock\Tags; 14 15use phpDocumentor\Reflection\DocBlock; 16use phpDocumentor\Reflection\DocBlock\Description; 17 18/** 19 * Parses a tag definition for a DocBlock. 20 */ 21abstract class BaseTag implements DocBlock\Tag 22{ 23 /** @var string Name of the tag */ 24 protected $name = ''; 25 26 /** @var Description|null Description of the tag. */ 27 protected $description; 28 29 /** 30 * Gets the name of this tag. 31 * 32 * @return string The name of this tag. 33 */ 34 public function getName() 35 { 36 return $this->name; 37 } 38 39 public function getDescription() 40 { 41 return $this->description; 42 } 43 44 public function render(Formatter $formatter = null) 45 { 46 if ($formatter === null) { 47 $formatter = new Formatter\PassthroughFormatter(); 48 } 49 50 return $formatter->format($this); 51 } 52} 53