root/trunk/src/main/php/net/stubbles/xml/serializer/annotations/stubXMLFragmentAnnotation.php

Revision 1301, 1.3 kB (checked in by richi, 4 months ago)

coding standards: fixed coding standards issues (function docblock)

Line 
1 <?php
2 /**
3  * Annotation for XMLSerializer
4  *
5  * @author      Stephan Schmidt <schst@stubbles.net>
6  * @package     stubbles
7  * @subpackage  xml_serializer_annotations
8  */
9 stubClassLoader::load('net::stubbles::reflection::annotations::stubAnnotation',
10                       'net::stubbles::reflection::annotations::stubAbstractAnnotation'
11 );
12 /**
13  * Annotation for XMLSerializer
14  *
15  * Use this annotation to serialize a value as an XML fragment.
16  *
17  * Properties of the annotation are:
18  * - tagName
19  *
20  * @package     stubbles
21  * @subpackage  xml_serializer_annotations
22  */
23 class stubXMLFragmentAnnotation extends stubAbstractAnnotation implements stubAnnotation
24 {
25     /**
26      * Name of the XML tag
27      *
28      * @var  string
29      */
30     protected $tagName;
31
32     /**
33      * Set the tag name
34      *
35      * @param  string  $tagName
36      */
37     public function setTagName($tagName)
38     {
39         $this->tagName = $tagName;
40     }
41
42     /**
43      * Get the tag name for the tag
44      *
45      * @return  string
46      */
47     public function getTagName()
48     {
49         return $this->tagName;
50     }
51
52     /**
53      * Returns the target of the annotation as bitmap.
54      *
55      * @return  int
56      */
57     public function getAnnotationTarget()
58     {
59         return stubAnnotation::TARGET_PROPERTY + stubAnnotation::TARGET_METHOD;
60     }
61 }
62 ?>
Note: See TracBrowser for help on using the browser.