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

Revision 1301, 1.8 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 tag.
16  *
17  * Properties of the annotation are:
18  * - tagName
19  * - elementTagName
20  *
21  * @package     stubbles
22  * @subpackage  xml_serializer_annotations
23  */
24 class stubXMLTagAnnotation extends stubAbstractAnnotation implements stubAnnotation
25 {
26     /**
27      * Name of the XML tag
28      *
29      * @var  string
30      */
31     protected $tagName;
32     /**
33      * Name of the XML tag for elements if this element is indexed
34      *
35      * @var  string
36      */
37     protected $elementTagName = null;
38
39     /**
40      * Set the tag name
41      *
42      * @param  string  $tagName
43      */
44     public function setTagName($tagName)
45     {
46         $this->tagName = $tagName;
47     }
48
49     /**
50      * Get the tag name for the tag
51      *
52      * @return  string
53      */
54     public function getTagName()
55     {
56         return $this->tagName;
57     }
58
59     /**
60      * Set the element tag name
61      *
62      * @param  string  $elementTagName
63      */
64     public function setElementTagName($elementTagName)
65     {
66         $this->elementTagName = $elementTagName;
67     }
68
69     /**
70      * Get the name for the element tag
71      *
72      * @return  string
73      */
74     public function getElementTagName()
75     {
76         return $this->elementTagName;
77     }
78
79     /**
80      * Returns the target of the annotation as bitmap.
81      *
82      * @return  int
83      */
84     public function getAnnotationTarget()
85     {
86         return stubAnnotation::TARGET_ALL;
87     }
88 }
89 ?>
Note: See TracBrowser for help on using the browser.