1: <?php
2: /*************************************************************************************/
3: /* */
4: /* Thelia */
5: /* */
6: /* Copyright (c) OpenStudio */
7: /* email : info@thelia.net */
8: /* web : http://www.thelia.net */
9: /* */
10: /* This program is free software; you can redistribute it and/or modify */
11: /* it under the terms of the GNU General Public License as published by */
12: /* the Free Software Foundation; either version 3 of the License */
13: /* */
14: /* This program is distributed in the hope that it will be useful, */
15: /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
16: /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
17: /* GNU General Public License for more details. */
18: /* */
19: /* You should have received a copy of the GNU General Public License */
20: /* along with this program. If not, see <http://www.gnu.org/licenses/>. */
21: /* */
22: /*************************************************************************************/
23:
24: namespace Thelia\Tpex;
25:
26: final class TpexToken
27: {
28: // Token types
29: /**
30: * @var int Open Simple Loop
31: */
32: const OSL = 1;
33:
34: /**
35: * @var int Close Simple Loop
36: */
37: const CSL = 2;
38:
39: /**
40: * @var int Open Conditional Loop
41: */
42: const OCL = 3;
43:
44: /**
45: * @var int Else Conditional Loop
46: */
47: const ECL = 4;
48:
49: /**
50: * @var int Close Conditional Loop
51: */
52: const CCL = 5;
53:
54: /**
55: * @var int TXT
56: */
57: const TXT = 7;
58:
59: /**
60: * @var int Open Test Loop
61: */
62: const OTL = 8;
63:
64: /**
65: * @var int Else Test Loop
66: */
67: const ETL = 9;
68:
69: /**
70: * @var int Close Test Loop
71: */
72: const CTL = 10;
73:
74: /**
75: * @var int Open Comment
76: */
77: const OCM = 11;
78:
79: /**
80: * @var int Close Comment
81: */
82: const CCM = 12;
83:
84: /**
85: * @var int Open Repeat Loop
86: */
87: const ORL = 13;
88:
89: /**
90: * @var int Close Repeat Loop
91: */
92: const CRL = 14;
93:
94: /**
95: * @var int Open Conditional Var Loop
96: */
97: const OCVL = 15;
98:
99: /**
100: * @var int Else Conditional Var Loop
101: */
102: const ECVL = 16;
103:
104: /**
105: * @var int Close Conditional Var Loop
106: */
107: const CCVL = 17;
108:
109: //Element Type
110: const TPEX_SIMPLE_LOOP = 1;
111: const TPEX_COND_LOOP = 2;
112: const TPEX_TEST_LOOP = 3;
113: const TPEX_TEXT = 4;
114: const TPEX_CONTENT = 5;
115: const TPEX_REPEAT_LOOP = 6;
116: const TPEX_COND_VAR_LOOP = 7;
117:
118: //separator
119: const ITER_SEP = "\x01";
120: const COUPLE_SEP = "\x02";
121: const ASSIGN_SEP = "\x03";
122: const START_MARK = "\x04";
123: }
124: