/src/DocBlox/Parser/DocBlock/Tag/Definition/Link.php
PHP | 43 lines | 12 code | 3 blank | 28 comment | 1 complexity | a7f1472a7e0e9f17d7740551bb070fac MD5 | raw file
Possible License(s): BSD-3-Clause
- <?php
- /**
- * DocBlox
- *
- * @category DocBlox
- * @package Parser
- * @subpackage Tag_Definitions
- * @author Mike van Riel <mike.vanriel@naenius.com>
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://docblox-project.org
- */
- /**
- * Definition for the @link tag; adds a attribute called `link`.
- *
- * @category DocBlox
- * @package Parser
- * @subpackage Tag_Definitions
- * @author Mike van Riel <mike.vanriel@naenius.com>
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://docblox-project.org
- */
- class DocBlox_Parser_DocBlock_Tag_Definition_Link extends DocBlox_Parser_DocBlock_Tag_Definition
- {
- /**
- * Adds a new attribute `link` to the structure element for this tag.
- *
- * @throws InvalidArgumentException if the associated tag is not of type Link.
- *
- * @return void
- */
- protected function configure()
- {
- if (!$this->tag instanceof DocBlox_Reflection_DocBlock_Tag_Link)
- {
- throw new InvalidArgumentException('Expected the tag to be for an @link');
- }
- $this->xml['link'] = $this->tag->getLink();
- }
- }