Mark V
1: <?php
2: namespace MOC\V\Component\Document\Vendor\UniversalXml\Source;
3:
4: /**
5: * Class TokenType
6: *
7: * @package MOC\V\Component\Document\Vendor\UniversalXml\Source
8: */
9: abstract class TokenType
10: {
11:
12: const TYPE_OPEN = 1;
13: const TYPE_CLOSE = 2;
14: const TYPE_SHORT = 3;
15: const TYPE_CDATA = 4;
16: const TYPE_COMMENT = 5;
17: protected $Type = 0;
18:
19: /**
20: * @return bool
21: */
22: public function isOpenTag()
23: {
24:
25: return $this->Type == self::TYPE_OPEN;
26: }
27:
28: /**
29: * @return bool
30: */
31: public function isCloseTag()
32: {
33:
34: return $this->Type == self::TYPE_CLOSE;
35: }
36:
37: /**
38: * @return bool
39: */
40: public function isShortTag()
41: {
42:
43: return $this->Type == self::TYPE_SHORT;
44: }
45:
46: /**
47: * @return bool
48: */
49: public function isCDATATag()
50: {
51:
52: return $this->Type == self::TYPE_CDATA;
53: }
54:
55: /**
56: * @return bool
57: */
58: public function isCommentTag()
59: {
60:
61: return $this->Type == self::TYPE_COMMENT;
62: }
63: }
64: