2 #include <php/Parser.h>
3 #include <php/ParserOutput.h>
4 #include <cpp/ext/ext.h>
7 ///////////////////////////////////////////////////////////////////////////////
9 const StaticString k_NS_SPECIAL
= "NS_SPECIAL";
10 const StaticString k_NS_FILE
= "NS_FILE";
11 const StaticString k_NS_MEDIA
= "NS_MEDIA";
14 /* preface finishes */
15 /* SRC: ParserOutput.php line 6 */
16 Variant
c_parseroutput::os_get(const char *s
, int64 hash
) {
17 return c_ObjectData::os_get(s
, hash
);
19 Variant
&c_parseroutput::os_lval(const char *s
, int64 hash
) {
20 return c_ObjectData::os_lval(s
, hash
);
22 void c_parseroutput::o_get(ArrayElementVec
&props
) const {
23 props
.push_back(NEW(ArrayElement
)("mText", m_mText
.isReferenced() ? ref(m_mText
) : m_mText
));
24 props
.push_back(NEW(ArrayElement
)("mLanguageLinks", m_mLanguageLinks
.isReferenced() ? ref(m_mLanguageLinks
) : m_mLanguageLinks
));
25 props
.push_back(NEW(ArrayElement
)("mCategories", m_mCategories
.isReferenced() ? ref(m_mCategories
) : m_mCategories
));
26 props
.push_back(NEW(ArrayElement
)("mContainsOldMagic", m_mContainsOldMagic
.isReferenced() ? ref(m_mContainsOldMagic
) : m_mContainsOldMagic
));
27 props
.push_back(NEW(ArrayElement
)("mTitleText", m_mTitleText
.isReferenced() ? ref(m_mTitleText
) : m_mTitleText
));
28 props
.push_back(NEW(ArrayElement
)("mCacheTime", m_mCacheTime
.isReferenced() ? ref(m_mCacheTime
) : m_mCacheTime
));
29 props
.push_back(NEW(ArrayElement
)("mVersion", m_mVersion
.isReferenced() ? ref(m_mVersion
) : m_mVersion
));
30 props
.push_back(NEW(ArrayElement
)("mLinks", m_mLinks
.isReferenced() ? ref(m_mLinks
) : m_mLinks
));
31 props
.push_back(NEW(ArrayElement
)("mTemplates", m_mTemplates
.isReferenced() ? ref(m_mTemplates
) : m_mTemplates
));
32 props
.push_back(NEW(ArrayElement
)("mTemplateIds", m_mTemplateIds
.isReferenced() ? ref(m_mTemplateIds
) : m_mTemplateIds
));
33 props
.push_back(NEW(ArrayElement
)("mImages", m_mImages
.isReferenced() ? ref(m_mImages
) : m_mImages
));
34 props
.push_back(NEW(ArrayElement
)("mExternalLinks", m_mExternalLinks
.isReferenced() ? ref(m_mExternalLinks
) : m_mExternalLinks
));
35 props
.push_back(NEW(ArrayElement
)("mNewSection", m_mNewSection
.isReferenced() ? ref(m_mNewSection
) : m_mNewSection
));
36 props
.push_back(NEW(ArrayElement
)("mHideNewSection", m_mHideNewSection
.isReferenced() ? ref(m_mHideNewSection
) : m_mHideNewSection
));
37 props
.push_back(NEW(ArrayElement
)("mNoGallery", m_mNoGallery
.isReferenced() ? ref(m_mNoGallery
) : m_mNoGallery
));
38 props
.push_back(NEW(ArrayElement
)("mHeadItems", m_mHeadItems
.isReferenced() ? ref(m_mHeadItems
) : m_mHeadItems
));
39 props
.push_back(NEW(ArrayElement
)("mOutputHooks", m_mOutputHooks
.isReferenced() ? ref(m_mOutputHooks
) : m_mOutputHooks
));
40 props
.push_back(NEW(ArrayElement
)("mWarnings", m_mWarnings
.isReferenced() ? ref(m_mWarnings
) : m_mWarnings
));
41 props
.push_back(NEW(ArrayElement
)("mSections", m_mSections
.isReferenced() ? ref(m_mSections
) : m_mSections
));
42 props
.push_back(NEW(ArrayElement
)("mProperties", m_mProperties
.isReferenced() ? ref(m_mProperties
) : m_mProperties
));
43 props
.push_back(NEW(ArrayElement
)("mTOCHTML", m_mTOCHTML
.isReferenced() ? ref(m_mTOCHTML
) : m_mTOCHTML
));
44 props
.push_back(NEW(ArrayElement
)("mIndexPolicy", m_mIndexPolicy
.isReferenced() ? ref(m_mIndexPolicy
) : m_mIndexPolicy
));
45 props
.push_back(NEW(ArrayElement
)("displayTitle", m_displayTitle
.isReferenced() ? ref(m_displayTitle
) : m_displayTitle
));
46 c_ObjectData::o_get(props
);
48 bool c_parseroutput::o_exists(CStrRef s
, int64 hash
) const {
49 if (hash
< 0) hash
= hash_string(s
.data(), s
.length());
52 HASH_EXISTS_STRING(0x4D0FABAA7AF12241LL
, mNewSection
, 11);
53 HASH_EXISTS_STRING(0x51991D5F3290D781LL
, mProperties
, 11);
56 HASH_EXISTS_STRING(0x601BA3BD6D279B46LL
, mHeadItems
, 10);
59 HASH_EXISTS_STRING(0x0007BEC0539A5248LL
, mTOCHTML
, 8);
60 HASH_EXISTS_STRING(0x5523B0DBE1475D48LL
, displayTitle
, 12);
63 HASH_EXISTS_STRING(0x46C79A73EB626D0FLL
, mImages
, 7);
66 HASH_EXISTS_STRING(0x54B0F4A9D39B8015LL
, mLinks
, 6);
67 HASH_EXISTS_STRING(0x7660548AFAAC8FD5LL
, mTemplates
, 10);
68 HASH_EXISTS_STRING(0x306EDD7587944F95LL
, mWarnings
, 9);
71 HASH_EXISTS_STRING(0x517EDA759E438B97LL
, mContainsOldMagic
, 17);
74 HASH_EXISTS_STRING(0x6C677FFFF7B1BA18LL
, mLanguageLinks
, 14);
77 HASH_EXISTS_STRING(0x1F1223E454FD0099LL
, mCategories
, 11);
80 HASH_EXISTS_STRING(0x69302AA34BFECFE3LL
, mText
, 5);
81 HASH_EXISTS_STRING(0x105ED53F02463263LL
, mTemplateIds
, 12);
84 HASH_EXISTS_STRING(0x4B82A404AEB169A5LL
, mHideNewSection
, 15);
87 HASH_EXISTS_STRING(0x2E65BD084E4ED46ALL
, mExternalLinks
, 14);
90 HASH_EXISTS_STRING(0x4A1938B4088847EELL
, mVersion
, 8);
93 HASH_EXISTS_STRING(0x3A96E9F9BCC9D533LL
, mCacheTime
, 10);
96 HASH_EXISTS_STRING(0x6E0F8F67A1BF3D74LL
, mIndexPolicy
, 12);
99 HASH_EXISTS_STRING(0x1A3DE12EE5312AF7LL
, mNoGallery
, 10);
102 HASH_EXISTS_STRING(0x69C42A41FA284BFELL
, mTitleText
, 10);
103 HASH_EXISTS_STRING(0x767B3F04BC53C6FELL
, mOutputHooks
, 12);
104 HASH_EXISTS_STRING(0x3557A3D58DFF483ELL
, mSections
, 9);
109 return c_ObjectData::o_exists(s
, hash
);
111 Variant
c_parseroutput::o_get(CStrRef s
, int64 hash
) {
112 if (hash
< 0) hash
= hash_string(s
.data(), s
.length());
115 HASH_RETURN_STRING(0x4D0FABAA7AF12241LL
, m_mNewSection
,
117 HASH_RETURN_STRING(0x51991D5F3290D781LL
, m_mProperties
,
121 HASH_RETURN_STRING(0x601BA3BD6D279B46LL
, m_mHeadItems
,
125 HASH_RETURN_STRING(0x0007BEC0539A5248LL
, m_mTOCHTML
,
127 HASH_RETURN_STRING(0x5523B0DBE1475D48LL
, m_displayTitle
,
131 HASH_RETURN_STRING(0x46C79A73EB626D0FLL
, m_mImages
,
135 HASH_RETURN_STRING(0x54B0F4A9D39B8015LL
, m_mLinks
,
137 HASH_RETURN_STRING(0x7660548AFAAC8FD5LL
, m_mTemplates
,
139 HASH_RETURN_STRING(0x306EDD7587944F95LL
, m_mWarnings
,
143 HASH_RETURN_STRING(0x517EDA759E438B97LL
, m_mContainsOldMagic
,
144 mContainsOldMagic
, 17);
147 HASH_RETURN_STRING(0x6C677FFFF7B1BA18LL
, m_mLanguageLinks
,
151 HASH_RETURN_STRING(0x1F1223E454FD0099LL
, m_mCategories
,
155 HASH_RETURN_STRING(0x69302AA34BFECFE3LL
, m_mText
,
157 HASH_RETURN_STRING(0x105ED53F02463263LL
, m_mTemplateIds
,
161 HASH_RETURN_STRING(0x4B82A404AEB169A5LL
, m_mHideNewSection
,
162 mHideNewSection
, 15);
165 HASH_RETURN_STRING(0x2E65BD084E4ED46ALL
, m_mExternalLinks
,
169 HASH_RETURN_STRING(0x4A1938B4088847EELL
, m_mVersion
,
173 HASH_RETURN_STRING(0x3A96E9F9BCC9D533LL
, m_mCacheTime
,
177 HASH_RETURN_STRING(0x6E0F8F67A1BF3D74LL
, m_mIndexPolicy
,
181 HASH_RETURN_STRING(0x1A3DE12EE5312AF7LL
, m_mNoGallery
,
185 HASH_RETURN_STRING(0x69C42A41FA284BFELL
, m_mTitleText
,
187 HASH_RETURN_STRING(0x767B3F04BC53C6FELL
, m_mOutputHooks
,
189 HASH_RETURN_STRING(0x3557A3D58DFF483ELL
, m_mSections
,
195 return c_ObjectData::o_get(s
, hash
);
197 Variant
c_parseroutput::o_set(CStrRef s
, int64 hash
, CVarRef v
,bool forInit
/* = false */) {
198 if (hash
< 0) hash
= hash_string(s
.data(), s
.length());
201 HASH_SET_STRING(0x4D0FABAA7AF12241LL
, m_mNewSection
,
203 HASH_SET_STRING(0x51991D5F3290D781LL
, m_mProperties
,
207 HASH_SET_STRING(0x601BA3BD6D279B46LL
, m_mHeadItems
,
211 HASH_SET_STRING(0x0007BEC0539A5248LL
, m_mTOCHTML
,
213 HASH_SET_STRING(0x5523B0DBE1475D48LL
, m_displayTitle
,
217 HASH_SET_STRING(0x46C79A73EB626D0FLL
, m_mImages
,
221 HASH_SET_STRING(0x54B0F4A9D39B8015LL
, m_mLinks
,
223 HASH_SET_STRING(0x7660548AFAAC8FD5LL
, m_mTemplates
,
225 HASH_SET_STRING(0x306EDD7587944F95LL
, m_mWarnings
,
229 HASH_SET_STRING(0x517EDA759E438B97LL
, m_mContainsOldMagic
,
230 mContainsOldMagic
, 17);
233 HASH_SET_STRING(0x6C677FFFF7B1BA18LL
, m_mLanguageLinks
,
237 HASH_SET_STRING(0x1F1223E454FD0099LL
, m_mCategories
,
241 HASH_SET_STRING(0x69302AA34BFECFE3LL
, m_mText
,
243 HASH_SET_STRING(0x105ED53F02463263LL
, m_mTemplateIds
,
247 HASH_SET_STRING(0x4B82A404AEB169A5LL
, m_mHideNewSection
,
248 mHideNewSection
, 15);
251 HASH_SET_STRING(0x2E65BD084E4ED46ALL
, m_mExternalLinks
,
255 HASH_SET_STRING(0x4A1938B4088847EELL
, m_mVersion
,
259 HASH_SET_STRING(0x3A96E9F9BCC9D533LL
, m_mCacheTime
,
263 HASH_SET_STRING(0x6E0F8F67A1BF3D74LL
, m_mIndexPolicy
,
267 HASH_SET_STRING(0x1A3DE12EE5312AF7LL
, m_mNoGallery
,
271 HASH_SET_STRING(0x69C42A41FA284BFELL
, m_mTitleText
,
273 HASH_SET_STRING(0x767B3F04BC53C6FELL
, m_mOutputHooks
,
275 HASH_SET_STRING(0x3557A3D58DFF483ELL
, m_mSections
,
281 return c_ObjectData::o_set(s
, hash
, v
, forInit
);
283 Variant
&c_parseroutput::o_lval(CStrRef s
, int64 hash
) {
284 if (hash
< 0) hash
= hash_string(s
.data(), s
.length());
287 HASH_RETURN_STRING(0x4D0FABAA7AF12241LL
, m_mNewSection
,
289 HASH_RETURN_STRING(0x51991D5F3290D781LL
, m_mProperties
,
293 HASH_RETURN_STRING(0x601BA3BD6D279B46LL
, m_mHeadItems
,
297 HASH_RETURN_STRING(0x0007BEC0539A5248LL
, m_mTOCHTML
,
299 HASH_RETURN_STRING(0x5523B0DBE1475D48LL
, m_displayTitle
,
303 HASH_RETURN_STRING(0x46C79A73EB626D0FLL
, m_mImages
,
307 HASH_RETURN_STRING(0x54B0F4A9D39B8015LL
, m_mLinks
,
309 HASH_RETURN_STRING(0x7660548AFAAC8FD5LL
, m_mTemplates
,
311 HASH_RETURN_STRING(0x306EDD7587944F95LL
, m_mWarnings
,
315 HASH_RETURN_STRING(0x517EDA759E438B97LL
, m_mContainsOldMagic
,
316 mContainsOldMagic
, 17);
319 HASH_RETURN_STRING(0x6C677FFFF7B1BA18LL
, m_mLanguageLinks
,
323 HASH_RETURN_STRING(0x1F1223E454FD0099LL
, m_mCategories
,
327 HASH_RETURN_STRING(0x69302AA34BFECFE3LL
, m_mText
,
329 HASH_RETURN_STRING(0x105ED53F02463263LL
, m_mTemplateIds
,
333 HASH_RETURN_STRING(0x4B82A404AEB169A5LL
, m_mHideNewSection
,
334 mHideNewSection
, 15);
337 HASH_RETURN_STRING(0x2E65BD084E4ED46ALL
, m_mExternalLinks
,
341 HASH_RETURN_STRING(0x4A1938B4088847EELL
, m_mVersion
,
345 HASH_RETURN_STRING(0x3A96E9F9BCC9D533LL
, m_mCacheTime
,
349 HASH_RETURN_STRING(0x6E0F8F67A1BF3D74LL
, m_mIndexPolicy
,
353 HASH_RETURN_STRING(0x1A3DE12EE5312AF7LL
, m_mNoGallery
,
357 HASH_RETURN_STRING(0x69C42A41FA284BFELL
, m_mTitleText
,
359 HASH_RETURN_STRING(0x767B3F04BC53C6FELL
, m_mOutputHooks
,
361 HASH_RETURN_STRING(0x3557A3D58DFF483ELL
, m_mSections
,
367 return c_ObjectData::o_lval(s
, hash
);
369 Variant
c_parseroutput::os_constant(const char *s
) {
370 return c_ObjectData::os_constant(s
);
372 IMPLEMENT_CLASS(parseroutput
)
373 ObjectData
*c_parseroutput::create(CStrRef v_text
// = ""
374 , CArrRef v_languageLinks
// = ScalarArrays::sa_[0]
375 , CArrRef v_categoryLinks
// = ScalarArrays::sa_[0]
376 , bool v_containsOldMagic
// = false
377 , CStrRef v_titletext
// = ""
380 t_parseroutput(v_text
, v_languageLinks
, v_categoryLinks
, v_containsOldMagic
, v_titletext
);
383 ObjectData
*c_parseroutput::dynCreate(CArrRef params
, bool init
/* = true */) {
385 int count
= params
.size();
386 if (count
<= 0) return (create());
387 if (count
== 1) return (create(params
.rvalAt(0)));
388 if (count
== 2) return (create(params
.rvalAt(0), params
.rvalAt(1)));
389 if (count
== 3) return (create(params
.rvalAt(0), params
.rvalAt(1), params
.rvalAt(2)));
390 if (count
== 4) return (create(params
.rvalAt(0), params
.rvalAt(1), params
.rvalAt(2), params
.rvalAt(3)));
391 return (create(params
.rvalAt(0), params
.rvalAt(1), params
.rvalAt(2), params
.rvalAt(3), params
.rvalAt(4)));
394 ObjectData
*c_parseroutput::cloneImpl() {
395 c_parseroutput
*obj
= NEW(c_parseroutput
)();
399 void c_parseroutput::cloneSet(c_parseroutput
*clone
) {
400 clone
->m_mText
= m_mText
.isReferenced() ? ref(m_mText
) : m_mText
;
401 clone
->m_mLanguageLinks
= m_mLanguageLinks
.isReferenced() ? ref(m_mLanguageLinks
) : m_mLanguageLinks
;
402 clone
->m_mCategories
= m_mCategories
.isReferenced() ? ref(m_mCategories
) : m_mCategories
;
403 clone
->m_mContainsOldMagic
= m_mContainsOldMagic
.isReferenced() ? ref(m_mContainsOldMagic
) : m_mContainsOldMagic
;
404 clone
->m_mTitleText
= m_mTitleText
.isReferenced() ? ref(m_mTitleText
) : m_mTitleText
;
405 clone
->m_mCacheTime
= m_mCacheTime
.isReferenced() ? ref(m_mCacheTime
) : m_mCacheTime
;
406 clone
->m_mVersion
= m_mVersion
.isReferenced() ? ref(m_mVersion
) : m_mVersion
;
407 clone
->m_mLinks
= m_mLinks
.isReferenced() ? ref(m_mLinks
) : m_mLinks
;
408 clone
->m_mTemplates
= m_mTemplates
.isReferenced() ? ref(m_mTemplates
) : m_mTemplates
;
409 clone
->m_mTemplateIds
= m_mTemplateIds
.isReferenced() ? ref(m_mTemplateIds
) : m_mTemplateIds
;
410 clone
->m_mImages
= m_mImages
.isReferenced() ? ref(m_mImages
) : m_mImages
;
411 clone
->m_mExternalLinks
= m_mExternalLinks
.isReferenced() ? ref(m_mExternalLinks
) : m_mExternalLinks
;
412 clone
->m_mNewSection
= m_mNewSection
.isReferenced() ? ref(m_mNewSection
) : m_mNewSection
;
413 clone
->m_mHideNewSection
= m_mHideNewSection
.isReferenced() ? ref(m_mHideNewSection
) : m_mHideNewSection
;
414 clone
->m_mNoGallery
= m_mNoGallery
.isReferenced() ? ref(m_mNoGallery
) : m_mNoGallery
;
415 clone
->m_mHeadItems
= m_mHeadItems
.isReferenced() ? ref(m_mHeadItems
) : m_mHeadItems
;
416 clone
->m_mOutputHooks
= m_mOutputHooks
.isReferenced() ? ref(m_mOutputHooks
) : m_mOutputHooks
;
417 clone
->m_mWarnings
= m_mWarnings
.isReferenced() ? ref(m_mWarnings
) : m_mWarnings
;
418 clone
->m_mSections
= m_mSections
.isReferenced() ? ref(m_mSections
) : m_mSections
;
419 clone
->m_mProperties
= m_mProperties
.isReferenced() ? ref(m_mProperties
) : m_mProperties
;
420 clone
->m_mTOCHTML
= m_mTOCHTML
.isReferenced() ? ref(m_mTOCHTML
) : m_mTOCHTML
;
421 clone
->m_mIndexPolicy
= m_mIndexPolicy
.isReferenced() ? ref(m_mIndexPolicy
) : m_mIndexPolicy
;
422 clone
->m_displayTitle
= m_displayTitle
.isReferenced() ? ref(m_displayTitle
) : m_displayTitle
;
423 ObjectData::cloneSet(clone
);
425 Variant
c_parseroutput::o_invoke(const char *s
, CArrRef params
, int64 hash
, bool fatal
) {
426 if (hash
< 0) hash
= hash_string_i(s
);
429 HASH_GUARD(0x434CEBEC8FDBB880LL
, gettext
) {
430 return (t_gettext());
434 HASH_GUARD(0x325093066EFE0201LL
, setdisplaytitle
) {
435 return (t_setdisplaytitle(params
.rvalAt(0)), null
);
439 HASH_GUARD(0x1E1ACEDC035034C5LL
, addwarning
) {
440 return (t_addwarning(params
.rvalAt(0)), null
);
444 HASH_GUARD(0x71FC9AA7F05A6BD3LL
, setproperty
) {
445 return (t_setproperty(params
.rvalAt(0), params
.rvalAt(1)), null
);
447 HASH_GUARD(0x6DBAA9816B039793LL
, addcategory
) {
448 return (t_addcategory(params
.rvalAt(0), params
.rvalAt(1)), null
);
452 HASH_GUARD(0x2983A8B8675FE955LL
, setcachetime
) {
453 return (t_setcachetime(params
.rvalAt(0)));
457 HASH_GUARD(0x1DEB2F58AAA8A419LL
, expired
) {
458 return (t_expired(params
.rvalAt(0)));
462 HASH_GUARD(0x78B79F97AFD45D1BLL
, setindexpolicy
) {
463 return (t_setindexpolicy(params
.rvalAt(0)));
467 HASH_GUARD(0x3F7198F790CA3D5CLL
, hidenewsection
) {
468 return (t_hidenewsection(params
.rvalAt(0)), null
);
470 HASH_GUARD(0x7207F5C225B9E59CLL
, settochtml
) {
471 return (t_settochtml(params
.rvalAt(0)));
475 HASH_GUARD(0x3374D72DB895979FLL
, getcategorylinks
) {
476 return (t_getcategorylinks());
480 HASH_GUARD(0x2295340384610322LL
, setcategorylinks
) {
481 return (t_setcategorylinks(params
.rvalAt(0)));
485 HASH_GUARD(0x17EB983A0D55AFA3LL
, setflag
) {
486 return (t_setflag(params
.rvalAt(0)), null
);
490 HASH_GUARD(0x0B5494D93581FFA5LL
, containsoldmagic
) {
491 return (t_containsoldmagic());
495 HASH_GUARD(0x5C75DB446C2096A6LL
, settext
) {
496 return (t_settext(params
.rvalAt(0)));
498 HASH_GUARD(0x668299C8203F7926LL
, addtemplate
) {
499 return (t_addtemplate(params
.rvalAt(0), params
.rvalAt(1), params
.rvalAt(2)), null
);
503 HASH_GUARD(0x1026F251B81BD927LL
, addimage
) {
504 return (t_addimage(params
.rvalAt(0)), null
);
508 HASH_GUARD(0x5C8BDF93ED656C68LL
, getcachetime
) {
509 return (t_getcachetime());
511 HASH_GUARD(0x3FE22FCE3F0B40E8LL
, addexternallink
) {
512 return (t_addexternallink(params
.rvalAt(0)), null
);
516 HASH_GUARD(0x657AED0066D1BEECLL
, addlanguagelink
) {
517 return (t_addlanguagelink(params
.rvalAt(0)), null
);
519 HASH_GUARD(0x5D10AC6ADCA895ACLL
, addlink
) {
520 int count
= params
.size();
521 if (count
<= 1) return (t_addlink(params
.rvalAt(0)), null
);
522 return (t_addlink(params
.rvalAt(0), params
.rvalAt(1)), null
);
526 HASH_GUARD(0x7AAA4B3474D6F233LL
, setnewsection
) {
527 return (t_setnewsection(params
.rvalAt(0)), null
);
531 HASH_GUARD(0x6A6A6F940F0C36F5LL
, setsections
) {
532 return (t_setsections(params
.rvalAt(0)));
536 HASH_GUARD(0x72C61C208667527ELL
, getcategories
) {
537 return ref(t_getcategories());
543 return c_ObjectData::o_invoke(s
, params
, hash
, fatal
);
545 Variant
c_parseroutput::o_invoke_few_args(const char *s
, int64 hash
, int count
, CVarRef a0
, CVarRef a1
, CVarRef a2
, CVarRef a3
, CVarRef a4
, CVarRef a5
) {
546 if (hash
< 0) hash
= hash_string_i(s
);
549 HASH_GUARD(0x434CEBEC8FDBB880LL
, gettext
) {
550 return (t_gettext());
554 HASH_GUARD(0x325093066EFE0201LL
, setdisplaytitle
) {
555 return (t_setdisplaytitle(a0
), null
);
559 HASH_GUARD(0x1E1ACEDC035034C5LL
, addwarning
) {
560 return (t_addwarning(a0
), null
);
564 HASH_GUARD(0x71FC9AA7F05A6BD3LL
, setproperty
) {
565 return (t_setproperty(a0
, a1
), null
);
567 HASH_GUARD(0x6DBAA9816B039793LL
, addcategory
) {
568 return (t_addcategory(a0
, a1
), null
);
572 HASH_GUARD(0x2983A8B8675FE955LL
, setcachetime
) {
573 return (t_setcachetime(a0
));
577 HASH_GUARD(0x1DEB2F58AAA8A419LL
, expired
) {
578 return (t_expired(a0
));
582 HASH_GUARD(0x78B79F97AFD45D1BLL
, setindexpolicy
) {
583 return (t_setindexpolicy(a0
));
587 HASH_GUARD(0x3F7198F790CA3D5CLL
, hidenewsection
) {
588 return (t_hidenewsection(a0
), null
);
590 HASH_GUARD(0x7207F5C225B9E59CLL
, settochtml
) {
591 return (t_settochtml(a0
));
595 HASH_GUARD(0x3374D72DB895979FLL
, getcategorylinks
) {
596 return (t_getcategorylinks());
600 HASH_GUARD(0x2295340384610322LL
, setcategorylinks
) {
601 return (t_setcategorylinks(a0
));
605 HASH_GUARD(0x17EB983A0D55AFA3LL
, setflag
) {
606 return (t_setflag(a0
), null
);
610 HASH_GUARD(0x0B5494D93581FFA5LL
, containsoldmagic
) {
611 return (t_containsoldmagic());
615 HASH_GUARD(0x5C75DB446C2096A6LL
, settext
) {
616 return (t_settext(a0
));
618 HASH_GUARD(0x668299C8203F7926LL
, addtemplate
) {
619 return (t_addtemplate(a0
, a1
, a2
), null
);
623 HASH_GUARD(0x1026F251B81BD927LL
, addimage
) {
624 return (t_addimage(a0
), null
);
628 HASH_GUARD(0x5C8BDF93ED656C68LL
, getcachetime
) {
629 return (t_getcachetime());
631 HASH_GUARD(0x3FE22FCE3F0B40E8LL
, addexternallink
) {
632 return (t_addexternallink(a0
), null
);
636 HASH_GUARD(0x657AED0066D1BEECLL
, addlanguagelink
) {
637 return (t_addlanguagelink(a0
), null
);
639 HASH_GUARD(0x5D10AC6ADCA895ACLL
, addlink
) {
640 if (count
<= 1) return (t_addlink(a0
), null
);
641 return (t_addlink(a0
, a1
), null
);
645 HASH_GUARD(0x7AAA4B3474D6F233LL
, setnewsection
) {
646 return (t_setnewsection(a0
), null
);
650 HASH_GUARD(0x6A6A6F940F0C36F5LL
, setsections
) {
651 return (t_setsections(a0
));
655 HASH_GUARD(0x72C61C208667527ELL
, getcategories
) {
656 return ref(t_getcategories());
662 return c_ObjectData::o_invoke_few_args(s
, hash
, count
, a0
, a1
, a2
, a3
, a4
, a5
);
664 Variant
c_parseroutput::os_invoke(const char *c
, const char *s
, CArrRef params
, int64 hash
, bool fatal
) {
665 return c_ObjectData::os_invoke(c
, s
, params
, hash
, fatal
);
667 Variant cw_parseroutput$
os_get(const char *s
) {
668 return c_parseroutput::os_get(s
, -1);
670 Variant
&cw_parseroutput$
os_lval(const char *s
) {
671 return c_parseroutput::os_lval(s
, -1);
673 Variant cw_parseroutput$
os_constant(const char *s
) {
674 return c_parseroutput::os_constant(s
);
676 Variant cw_parseroutput$
os_invoke(const char *c
, const char *s
, CArrRef params
, bool fatal
/* = true */) {
677 return c_parseroutput::os_invoke(c
, s
, params
, -1, fatal
);
679 void c_parseroutput::init() {
681 m_mLanguageLinks
= null
;
682 m_mCategories
= null
;
683 m_mContainsOldMagic
= null
;
686 m_mVersion
= "1.6.4" /* parser::VERSION */;
687 m_mLinks
= ScalarArrays::sa_
[0];
688 m_mTemplates
= ScalarArrays::sa_
[0];
689 m_mTemplateIds
= ScalarArrays::sa_
[0];
690 m_mImages
= ScalarArrays::sa_
[0];
691 m_mExternalLinks
= ScalarArrays::sa_
[0];
692 m_mNewSection
= false;
693 m_mHideNewSection
= false;
694 m_mNoGallery
= false;
695 m_mHeadItems
= ScalarArrays::sa_
[0];
696 m_mOutputHooks
= ScalarArrays::sa_
[0];
697 m_mWarnings
= ScalarArrays::sa_
[0];
698 m_mSections
= ScalarArrays::sa_
[0];
699 m_mProperties
= ScalarArrays::sa_
[0];
702 m_displayTitle
= false;
704 /* SRC: ParserOutput.php line 36 */
705 void c_parseroutput::t_parseroutput(CStrRef v_text
// = ""
706 , CArrRef v_languageLinks
// = ScalarArrays::sa_[0]
707 , CArrRef v_categoryLinks
// = ScalarArrays::sa_[0]
708 , bool v_containsOldMagic
// = false
709 , CStrRef v_titletext
// = ""
711 INSTANCE_METHOD_INJECTION(ParserOutput
, ParserOutput::ParserOutput
);
712 bool oldInCtor
= gasInCtor(true);
714 (m_mLanguageLinks
= v_languageLinks
);
715 (m_mCategories
= v_categoryLinks
);
716 (m_mContainsOldMagic
= v_containsOldMagic
);
717 (m_mTitleText
= v_titletext
);
718 gasInCtor(oldInCtor
);
720 /* SRC: ParserOutput.php line 46 */
721 Variant
c_parseroutput::t_gettext() {
722 INSTANCE_METHOD_INJECTION(ParserOutput
, ParserOutput::getText
);
725 /* SRC: ParserOutput.php line 47 */
726 Variant
c_parseroutput::t_getlanguagelinks() {
727 INSTANCE_METHOD_INJECTION(ParserOutput
, ParserOutput::getLanguageLinks
);
728 return ref(lval(m_mLanguageLinks
));
730 /* SRC: ParserOutput.php line 48 */
731 Variant
c_parseroutput::t_getcategorylinks() {
732 INSTANCE_METHOD_INJECTION(ParserOutput
, ParserOutput::getCategoryLinks
);
733 return LINE(48,x_array_keys(m_mCategories
));
735 /* SRC: ParserOutput.php line 49 */
736 Variant
c_parseroutput::t_getcategories() {
737 INSTANCE_METHOD_INJECTION(ParserOutput
, ParserOutput::getCategories
);
738 return ref(lval(m_mCategories
));
740 /* SRC: ParserOutput.php line 50 */
741 Variant
c_parseroutput::t_getcachetime() {
742 INSTANCE_METHOD_INJECTION(ParserOutput
, ParserOutput::getCacheTime
);
745 /* SRC: ParserOutput.php line 51 */
746 Variant
c_parseroutput::t_gettitletext() {
747 INSTANCE_METHOD_INJECTION(ParserOutput
, ParserOutput::getTitleText
);
750 /* SRC: ParserOutput.php line 52 */
751 Variant
c_parseroutput::t_getsections() {
752 INSTANCE_METHOD_INJECTION(ParserOutput
, ParserOutput::getSections
);
755 /* SRC: ParserOutput.php line 53 */
756 Variant
c_parseroutput::t_getlinks() {
757 INSTANCE_METHOD_INJECTION(ParserOutput
, ParserOutput::getLinks
);
758 return ref(lval(m_mLinks
));
760 /* SRC: ParserOutput.php line 54 */
761 Variant
c_parseroutput::t_gettemplates() {
762 INSTANCE_METHOD_INJECTION(ParserOutput
, ParserOutput::getTemplates
);
763 return ref(lval(m_mTemplates
));
765 /* SRC: ParserOutput.php line 55 */
766 Variant
c_parseroutput::t_getimages() {
767 INSTANCE_METHOD_INJECTION(ParserOutput
, ParserOutput::getImages
);
768 return ref(lval(m_mImages
));
770 /* SRC: ParserOutput.php line 56 */
771 Variant
c_parseroutput::t_getexternallinks() {
772 INSTANCE_METHOD_INJECTION(ParserOutput
, ParserOutput::getExternalLinks
);
773 return ref(lval(m_mExternalLinks
));
775 /* SRC: ParserOutput.php line 57 */
776 Variant
c_parseroutput::t_getnogallery() {
777 INSTANCE_METHOD_INJECTION(ParserOutput
, ParserOutput::getNoGallery
);
780 /* SRC: ParserOutput.php line 58 */
781 Variant
c_parseroutput::t_getsubtitle() {
782 INSTANCE_METHOD_INJECTION(ParserOutput
, ParserOutput::getSubtitle
);
783 return o_get("mSubtitle", 0x643E52ADEE1E7DA4LL
);
785 /* SRC: ParserOutput.php line 59 */
786 Array
c_parseroutput::t_getoutputhooks() {
787 INSTANCE_METHOD_INJECTION(ParserOutput
, ParserOutput::getOutputHooks
);
788 return toArray(m_mOutputHooks
);
790 /* SRC: ParserOutput.php line 60 */
791 Variant
c_parseroutput::t_getwarnings() {
792 INSTANCE_METHOD_INJECTION(ParserOutput
, ParserOutput::getWarnings
);
793 return LINE(60,x_array_keys(m_mWarnings
));
795 /* SRC: ParserOutput.php line 61 */
796 Variant
c_parseroutput::t_getindexpolicy() {
797 INSTANCE_METHOD_INJECTION(ParserOutput
, ParserOutput::getIndexPolicy
);
798 return m_mIndexPolicy
;
800 /* SRC: ParserOutput.php line 62 */
801 Variant
c_parseroutput::t_gettochtml() {
802 INSTANCE_METHOD_INJECTION(ParserOutput
, ParserOutput::getTOCHTML
);
805 /* SRC: ParserOutput.php line 64 */
806 Variant
c_parseroutput::t_containsoldmagic() {
807 INSTANCE_METHOD_INJECTION(ParserOutput
, ParserOutput::containsOldMagic
);
808 return m_mContainsOldMagic
;
810 /* SRC: ParserOutput.php line 65 */
811 Variant
c_parseroutput::t_settext(Variant v_text
) {
812 INSTANCE_METHOD_INJECTION(ParserOutput
, ParserOutput::setText
);
813 return LINE(65,invoke_failed("wfsetvar", Array(ArrayInit(2).set(0, ref(m_mText
)).set(1, ref(v_text
)).create()), 0x000000009E927E0BLL
));
815 /* SRC: ParserOutput.php line 66 */
816 Variant
c_parseroutput::t_setlanguagelinks(Variant v_ll
) {
817 INSTANCE_METHOD_INJECTION(ParserOutput
, ParserOutput::setLanguageLinks
);
818 return LINE(66,invoke_failed("wfsetvar", Array(ArrayInit(2).set(0, ref(m_mLanguageLinks
)).set(1, ref(v_ll
)).create()), 0x000000009E927E0BLL
));
820 /* SRC: ParserOutput.php line 67 */
821 Variant
c_parseroutput::t_setcategorylinks(Variant v_cl
) {
822 INSTANCE_METHOD_INJECTION(ParserOutput
, ParserOutput::setCategoryLinks
);
823 return LINE(67,invoke_failed("wfsetvar", Array(ArrayInit(2).set(0, ref(m_mCategories
)).set(1, ref(v_cl
)).create()), 0x000000009E927E0BLL
));
825 /* SRC: ParserOutput.php line 68 */
826 Variant
c_parseroutput::t_setcontainsoldmagic(Variant v_com
) {
827 INSTANCE_METHOD_INJECTION(ParserOutput
, ParserOutput::setContainsOldMagic
);
828 return LINE(68,invoke_failed("wfsetvar", Array(ArrayInit(2).set(0, ref(m_mContainsOldMagic
)).set(1, ref(v_com
)).create()), 0x000000009E927E0BLL
));
830 /* SRC: ParserOutput.php line 69 */
831 Variant
c_parseroutput::t_setcachetime(Variant v_t
) {
832 INSTANCE_METHOD_INJECTION(ParserOutput
, ParserOutput::setCacheTime
);
833 return LINE(69,invoke_failed("wfsetvar", Array(ArrayInit(2).set(0, ref(m_mCacheTime
)).set(1, ref(v_t
)).create()), 0x000000009E927E0BLL
));
835 /* SRC: ParserOutput.php line 70 */
836 Variant
c_parseroutput::t_settitletext(Variant v_t
) {
837 INSTANCE_METHOD_INJECTION(ParserOutput
, ParserOutput::setTitleText
);
838 return LINE(70,invoke_failed("wfsetvar", Array(ArrayInit(2).set(0, ref(m_mTitleText
)).set(1, ref(v_t
)).create()), 0x000000009E927E0BLL
));
840 /* SRC: ParserOutput.php line 71 */
841 Variant
c_parseroutput::t_setsections(Variant v_toc
) {
842 INSTANCE_METHOD_INJECTION(ParserOutput
, ParserOutput::setSections
);
843 return LINE(71,invoke_failed("wfsetvar", Array(ArrayInit(2).set(0, ref(m_mSections
)).set(1, ref(v_toc
)).create()), 0x000000009E927E0BLL
));
845 /* SRC: ParserOutput.php line 72 */
846 Variant
c_parseroutput::t_setindexpolicy(Variant v_policy
) {
847 INSTANCE_METHOD_INJECTION(ParserOutput
, ParserOutput::setIndexPolicy
);
848 return LINE(72,invoke_failed("wfsetvar", Array(ArrayInit(2).set(0, ref(m_mIndexPolicy
)).set(1, ref(v_policy
)).create()), 0x000000009E927E0BLL
));
850 /* SRC: ParserOutput.php line 73 */
851 Variant
c_parseroutput::t_settochtml(Variant v_tochtml
) {
852 INSTANCE_METHOD_INJECTION(ParserOutput
, ParserOutput::setTOCHTML
);
853 return LINE(73,invoke_failed("wfsetvar", Array(ArrayInit(2).set(0, ref(m_mTOCHTML
)).set(1, ref(v_tochtml
)).create()), 0x000000009E927E0BLL
));
855 /* SRC: ParserOutput.php line 75 */
856 void c_parseroutput::t_addcategory(CVarRef v_c
, CVarRef v_sort
) {
857 INSTANCE_METHOD_INJECTION(ParserOutput
, ParserOutput::addCategory
);
858 m_mCategories
.set(v_c
, (v_sort
));
860 /* SRC: ParserOutput.php line 76 */
861 void c_parseroutput::t_addlanguagelink(CVarRef v_t
) {
862 INSTANCE_METHOD_INJECTION(ParserOutput
, ParserOutput::addLanguageLink
);
863 m_mLanguageLinks
.append((v_t
));
865 /* SRC: ParserOutput.php line 77 */
866 void c_parseroutput::t_addwarning(CVarRef v_s
) {
867 INSTANCE_METHOD_INJECTION(ParserOutput
, ParserOutput::addWarning
);
868 m_mWarnings
.set(v_s
, (1LL));
870 /* SRC: ParserOutput.php line 79 */
871 void c_parseroutput::t_addoutputhook(CVarRef v_hook
, bool v_data
// = false
873 INSTANCE_METHOD_INJECTION(ParserOutput
, ParserOutput::addOutputHook
);
874 m_mOutputHooks
.append((Array(ArrayInit(2).set(0, v_hook
).set(1, v_data
).create())));
876 /* SRC: ParserOutput.php line 83 */
877 void c_parseroutput::t_setnewsection(CVarRef v_value
) {
878 INSTANCE_METHOD_INJECTION(ParserOutput
, ParserOutput::setNewSection
);
879 (m_mNewSection
= toBoolean(v_value
));
881 /* SRC: ParserOutput.php line 86 */
882 void c_parseroutput::t_hidenewsection(CVarRef v_value
) {
883 INSTANCE_METHOD_INJECTION(ParserOutput
, ParserOutput::hideNewSection
);
884 (m_mHideNewSection
= toBoolean(v_value
));
886 /* SRC: ParserOutput.php line 89 */
887 bool c_parseroutput::t_gethidenewsection() {
888 INSTANCE_METHOD_INJECTION(ParserOutput
, ParserOutput::getHideNewSection
);
889 return toBoolean(m_mHideNewSection
);
891 /* SRC: ParserOutput.php line 92 */
892 bool c_parseroutput::t_getnewsection() {
893 INSTANCE_METHOD_INJECTION(ParserOutput
, ParserOutput::getNewSection
);
894 return toBoolean(m_mNewSection
);
896 /* SRC: ParserOutput.php line 96 */
897 void c_parseroutput::t_addexternallink(CVarRef v_url
) {
898 INSTANCE_METHOD_INJECTION(ParserOutput
, ParserOutput::addExternalLink
);
899 DECLARE_GLOBAL_VARIABLES(g
);
900 Variant
&gv_wgServer
__attribute__((__unused__
)) = g
->GV(wgServer
);
901 Variant
&gv_wgRegisterInternalExternals
__attribute__((__unused__
)) = g
->GV(wgRegisterInternalExternals
);
904 if ((toBoolean(gv_wgRegisterInternalExternals
)) || (!same(LINE(99,x_stripos(toString(v_url
), concat(toString(gv_wgServer
), "/"))), 0LL))) m_mExternalLinks
.set(v_url
, (1LL));
906 /* SRC: ParserOutput.php line 103 */
907 void c_parseroutput::t_addlink(CVarRef v_title
, Variant v_id
// = null
909 INSTANCE_METHOD_INJECTION(ParserOutput
, ParserOutput::addLink
);
913 if (toBoolean(LINE(104,toObject(v_title
)->o_invoke_few_args("isExternal", 0x16F7C0178CF6E138LL
, 0)))) {
916 (v_ns
= LINE(108,toObject(v_title
)->o_invoke_few_args("getNamespace", 0x6DC05480D007D522LL
, 0)));
917 (v_dbk
= LINE(109,toObject(v_title
)->o_invoke_few_args("getDBkey", 0x7A72F137192AEF00LL
, 0)));
918 if (equal(v_ns
, k_NS_MEDIA
)) {
921 else if (equal(v_ns
, k_NS_SPECIAL
)) {
924 else if (same(v_dbk
, "")) {
927 if (!(isset(m_mLinks
, v_ns
))) {
928 m_mLinks
.set(v_ns
, (ScalarArrays::sa_
[0]));
930 if (LINE(124,x_is_null(v_id
))) {
931 (v_id
= LINE(125,toObject(v_title
)->o_invoke_few_args("getArticleID", 0x094F8EE5A02782D6LL
, 0)));
933 lval(m_mLinks
.lvalAt(v_ns
)).set(v_dbk
, (v_id
));
935 /* SRC: ParserOutput.php line 130 */
936 void c_parseroutput::t_addimage(CVarRef v_name
) {
937 INSTANCE_METHOD_INJECTION(ParserOutput
, ParserOutput::addImage
);
938 m_mImages
.set(v_name
, (1LL));
940 /* SRC: ParserOutput.php line 134 */
941 void c_parseroutput::t_addtemplate(CVarRef v_title
, CVarRef v_page_id
, CVarRef v_rev_id
) {
942 INSTANCE_METHOD_INJECTION(ParserOutput
, ParserOutput::addTemplate
);
946 (v_ns
= LINE(135,toObject(v_title
)->o_invoke_few_args("getNamespace", 0x6DC05480D007D522LL
, 0)));
947 (v_dbk
= LINE(136,toObject(v_title
)->o_invoke_few_args("getDBkey", 0x7A72F137192AEF00LL
, 0)));
948 if (!(isset(m_mTemplates
, v_ns
))) {
949 m_mTemplates
.set(v_ns
, (ScalarArrays::sa_
[0]));
951 lval(m_mTemplates
.lvalAt(v_ns
)).set(v_dbk
, (v_page_id
));
952 if (!(isset(m_mTemplateIds
, v_ns
))) {
953 m_mTemplateIds
.set(v_ns
, (ScalarArrays::sa_
[0]));
955 lval(m_mTemplateIds
.lvalAt(v_ns
)).set(v_dbk
, (v_rev_id
));
957 /* SRC: ParserOutput.php line 156 */
958 bool c_parseroutput::t_expired(CVarRef v_touched
) {
959 INSTANCE_METHOD_INJECTION(ParserOutput
, ParserOutput::expired
);
960 DECLARE_GLOBAL_VARIABLES(g
);
961 Variant
&gv_wgCacheEpoch
__attribute__((__unused__
)) = g
->GV(wgCacheEpoch
);
962 return equal(LINE(158,t_getcachetime()), -1LL) || less(LINE(159,t_getcachetime()), v_touched
) || not_more(LINE(160,t_getcachetime()), gv_wgCacheEpoch
) || !(t___isset("mVersion")) || toBoolean(LINE(162,x_version_compare(toString(m_mVersion
), "1.6.4" /* parser::VERSION */, "lt")));
964 /* SRC: ParserOutput.php line 170 */
965 void c_parseroutput::t_addheaditem(CVarRef v_section
, bool v_tag
// = false
967 INSTANCE_METHOD_INJECTION(ParserOutput
, ParserOutput::addHeadItem
);
968 if (!same(v_tag
, false)) {
969 m_mHeadItems
.set(v_tag
, (v_section
));
972 m_mHeadItems
.append((v_section
));
975 /* SRC: ParserOutput.php line 185 */
976 void c_parseroutput::t_setdisplaytitle(CVarRef v_text
) {
977 INSTANCE_METHOD_INJECTION(ParserOutput
, ParserOutput::setDisplayTitle
);
978 (m_displayTitle
= v_text
);
980 /* SRC: ParserOutput.php line 194 */
981 Variant
c_parseroutput::t_getdisplaytitle() {
982 INSTANCE_METHOD_INJECTION(ParserOutput
, ParserOutput::getDisplayTitle
);
983 return m_displayTitle
;
985 /* SRC: ParserOutput.php line 201 */
986 void c_parseroutput::t_setflag(CVarRef v_flag
) {
987 INSTANCE_METHOD_INJECTION(ParserOutput
, ParserOutput::setFlag
);
988 lval(o_lval("mFlags", 0x3A295C456F72E3D0LL
)).set(v_flag
, (true));
990 /* SRC: ParserOutput.php line 205 */
991 bool c_parseroutput::t_getflag(CVarRef v_flag
) {
992 INSTANCE_METHOD_INJECTION(ParserOutput
, ParserOutput::getFlag
);
993 return isset(o_get("mFlags", 0x3A295C456F72E3D0LL
), v_flag
);
995 /* SRC: ParserOutput.php line 212 */
996 void c_parseroutput::t_setproperty(CVarRef v_name
, CVarRef v_value
) {
997 INSTANCE_METHOD_INJECTION(ParserOutput
, ParserOutput::setProperty
);
998 m_mProperties
.set(v_name
, (v_value
));
1000 /* SRC: ParserOutput.php line 216 */
1001 Variant
c_parseroutput::t_getproperty(CVarRef v_name
) {
1002 INSTANCE_METHOD_INJECTION(ParserOutput
, ParserOutput::getProperty
);
1003 return isset(m_mProperties
, v_name
) ? ((Variant
)(m_mProperties
.rvalAt(v_name
))) : ((Variant
)(false));
1005 /* SRC: ParserOutput.php line 220 */
1006 Variant
c_parseroutput::t_getproperties() {
1007 INSTANCE_METHOD_INJECTION(ParserOutput
, ParserOutput::getProperties
);
1008 if (!(t___isset("mProperties"))) {
1009 (m_mProperties
= ScalarArrays::sa_
[0]);
1011 return m_mProperties
;
1013 Object
co_parseroutput(CArrRef params
, bool init
/* = true */) {
1014 return Object(p_parseroutput(NEW(c_parseroutput
)())->dynCreate(params
, init
));
1016 Variant pm_php$
ParserOutput_php(bool incOnce
/* = false */, LVariableTable
* variables
/* = NULL */) {
1017 FUNCTION_INJECTION(run_init::ParserOutput
.php
);
1019 DECLARE_GLOBAL_VARIABLES(g
);
1020 bool &alreadyRun
= g
->run_pm_php$ParserOutput_php
;
1021 if (alreadyRun
) { if (incOnce
) return true;}
1022 else alreadyRun
= true;
1023 if (!variables
) variables
= g
;
1025 DECLARE_GLOBAL_VARIABLES(g
);
1026 LVariableTable
*gVariables
__attribute__((__unused__
)) = get_variable_table();
1030 ///////////////////////////////////////////////////////////////////////////////