-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPHP-EXT.xml
97 lines (97 loc) · 10.4 KB
/
PHP-EXT.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<templateSet group="PHP-EXT">
<template name="hg" value="/** * Check if $PROP_NAME$ was set. * * @return boolean */ public function has$PROP_NAME_FN$() { return isset($this->$PROP_NAME_VAR$); } /** * Get $PROP_NAME$. * * @return $PROP_TYPE$$DEFVAL$ */ public function get$PROP_NAME_FN$() { if (!$this->has$PROP_NAME_FN$()) { return null; } return $this->$PROP_NAME_VAR$; }" description="Has, get" toReformat="false" toShortenFQNames="true">
<variable name="PROP_NAME_VAR" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="PROP_TYPE" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="PROP_NAME" expression="underscoresToSpaces(snakeCase(PROP_NAME_VAR))" defaultValue="" alwaysStopAt="true" />
<variable name="PROP_NAME_FN" expression="capitalize(PROP_NAME_VAR)" defaultValue="" alwaysStopAt="false" />
<variable name="DEFVAL" expression="" defaultValue="|null" alwaysStopAt="true" />
<context>
<option name="HTML_TEXT" value="false" />
<option name="HTML" value="false" />
<option name="XSL_TEXT" value="false" />
<option name="XML" value="false" />
<option name="SQL" value="false" />
<option name="JSP" value="false" />
<option name="CSS_PROPERTY_VALUE" value="false" />
<option name="CSS_DECLARATION_BLOCK" value="false" />
<option name="CSS_RULESET_LIST" value="false" />
<option name="CSS" value="false" />
<option name="CUCUMBER_FEATURE_FILE" value="false" />
<option name="JAVA_SCRIPT" value="false" />
<option name="CoffeeScript" value="false" />
<option name="PHP" value="true" />
<option name="HAML" value="false" />
<option name="OTHER" value="false" />
</context>
</template>
<template name="gs" value="/** * Get $PROP_NAME$. * * @return $PROP_TYPE$|$DEFVAL$ */ public function get$PROP_NAME_FN$() { return $this->$PROP_NAME_VAR$; } /** * Set $PROP_NAME$. * * @param $PROP_TYPE$ $value The new value. * @return $this */ public function set$PROP_NAME_FN$($$PROP_NAME_VAR$ = $DEFVAL$) { $this->$PROP_NAME_VAR$ = $$PROP_NAME_VAR$; return $this; }" description="Get, Set" toReformat="false" toShortenFQNames="true">
<variable name="PROP_NAME_VAR" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="PROP_TYPE" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="DEFVAL" expression="" defaultValue="null" alwaysStopAt="true" />
<variable name="PROP_NAME" expression="underscoresToSpaces(snakeCase(PROP_NAME_VAR))" defaultValue="" alwaysStopAt="false" />
<variable name="PROP_NAME_FN" expression="capitalize(PROP_NAME_VAR)" defaultValue="" alwaysStopAt="false" />
<context>
<option name="PHP" value="true" />
</context>
</template>
<template name="g" value="/** * Get $PROP_NAME$. * * @return $PROP_TYPE$|$DEFVAL$ */ public function get$PROP_NAME_FN$() { return $this->$PROP_NAME_VAR$; }" description="get" toReformat="false" toShortenFQNames="true">
<variable name="PROP_NAME_VAR" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="PROP_TYPE" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="DEFVAL" expression="" defaultValue="null" alwaysStopAt="true" />
<variable name="PROP_NAME" expression="underscoresToSpaces(snakeCase(PROP_NAME_VAR))" defaultValue="" alwaysStopAt="false" />
<variable name="PROP_NAME_FN" expression="capitalize(PROP_NAME_VAR)" defaultValue="" alwaysStopAt="false" />
<context>
<option name="PHP" value="true" />
</context>
</template>
<template name="hgs" value="/** * Check if $PROP_NAME$ was set. * * @return boolean */ public function has$PROP_NAME_FN$() { return isset($this->$PROP_NAME_VAR$); } /** * Get $PROP_NAME$. * * @return $PROP_TYPE$|$DEFVAL$ */ public function get$PROP_NAME_FN$() { if (!$this->has$PROP_NAME_FN$()) { return $DEFVAL$; } return $this->$PROP_NAME_VAR$; } /** * Set $PROP_NAME$. * * @param $PROP_TYPE$ $value The new value. * @return $this */ public function set$PROP_NAME_FN$($$PROP_NAME_VAR$ = $DEFVAL$) { $this->$PROP_NAME_VAR$ = $$PROP_NAME_VAR$; return $this; }" description="Has, get, set" toReformat="false" toShortenFQNames="true">
<variable name="PROP_NAME_VAR" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="PROP_TYPE" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="PROP_NAME" expression="underscoresToSpaces(snakeCase(PROP_NAME_VAR))" defaultValue="" alwaysStopAt="true" />
<variable name="PROP_NAME_FN" expression="capitalize(PROP_NAME_VAR)" defaultValue="" alwaysStopAt="false" />
<variable name="DEFVAL" expression="" defaultValue="null" alwaysStopAt="true" />
<context>
<option name="HTML_TEXT" value="false" />
<option name="HTML" value="false" />
<option name="XSL_TEXT" value="false" />
<option name="XML" value="false" />
<option name="SQL" value="false" />
<option name="JSP" value="false" />
<option name="CSS_PROPERTY_VALUE" value="false" />
<option name="CSS_DECLARATION_BLOCK" value="false" />
<option name="CSS_RULESET_LIST" value="false" />
<option name="CSS" value="false" />
<option name="CUCUMBER_FEATURE_FILE" value="false" />
<option name="JAVA_SCRIPT" value="false" />
<option name="CoffeeScript" value="false" />
<option name="PHP" value="true" />
<option name="HAML" value="false" />
<option name="OTHER" value="false" />
</context>
</template>
<template name="iru" value="/** * Check if the $PROP_NAME$ with the given $IDENTIFIER$ is registered. * * @param string $$$PROP_NAME_VAR$$IDENTIFIER_FN$ The identifier of the $PROP_NAME$. * @return boolean */ public function is$PROP_NAME_FN$Registered($$$PROP_NAME_VAR$$IDENTIFIER_FN$) { return isset($this->registered$PROP_NAME_FN$s[$$$PROP_NAME_VAR$$IDENTIFIER_FN$]); } /** * Get the $PROP_NAME$ registered with the given $IDENTIFIER$. * * @param string $$$PROP_NAME_VAR$$IDENTIFIER_FN$ The $IDENTIFIER$ of the $PROP_NAME$. * @return $PROP_TYPE$|null If there is no $PROP_NAME$ registered with the given $IDENTIFIER$. */ public function getRegistered$PROP_NAME_FN$($$$PROP_NAME_VAR$$IDENTIFIER_FN$) { if (!$this->is$PROP_NAME_FN$Registered($$$PROP_NAME_VAR$$IDENTIFIER_FN$)) { return null; } return $this->registered$PROP_NAME_FN$s[$$$PROP_NAME_VAR$$IDENTIFIER_FN$]; } /** * Get all registered $PROP_NAME$s. * * @return $PROP_TYPE$[] With $IDENTIFIER$s as keys. */ public function getRegistered$PROP_NAME_FN$s() { return $this->registered$PROP_NAME_FN$s; } /** * Register a new $PROP_NAME$. * * @param $PROP_TYPE$ $$$PROP_NAME_VAR$ The $PROP_NAME$ to be registered. * @throws \Exception If the given $PROP_NAME$ is already registered. * @return $this */ public function register$PROP_NAME_FN$($PROP_TYPE$ $$$PROP_NAME_VAR$) { $$$PROP_NAME_VAR$$IDENTIFIER_FN$ = $$$PROP_NAME_VAR$->get$IDENTIFIER_FN$(); if ($this->is$PROP_NAME_FN$Registered($$$PROP_NAME_VAR$$IDENTIFIER_FN$)) { throw new \Exception( sprintf( 'The $PROP_NAME$ with the $IDENTIFIER$ "%s" is already registered.', $$$PROP_NAME_VAR$$IDENTIFIER_FN$ ) ); } $this->registered$PROP_NAME_FN$s[$$$PROP_NAME_VAR$$IDENTIFIER_FN$] = $$$PROP_NAME_VAR$; return $this; } /** * Un-register a $PROP_NAME$ registered with the given $IDENTIFIER$. * * @param string $$$PROP_NAME_VAR$$IDENTIFIER_FN$ The $IDENTIFIER$ of the $PROP_NAME$ to be unregistered. * @throws \Exception If there is no $PROP_NAME$ registered with the given $IDENTIFIER$. * @return $PROP_TYPE$ The un-registered $PROP_NAME$. */ public function unRegister$PROP_NAME_FN$($$$PROP_NAME_VAR$$IDENTIFIER_FN$) { if ($this->is$PROP_NAME_FN$Registered($$$PROP_NAME_VAR$$IDENTIFIER_FN$)) { throw new \Exception( sprintf( 'There is no $PROP_NAME$ registered with the $IDENTIFIER$ "%s".', $$$PROP_NAME_VAR$$IDENTIFIER_FN$ ) ); } $$unRegistered$PROP_NAME_FN$ = $this->registered$PROP_NAME_FN$s[$$$PROP_NAME_VAR$$IDENTIFIER_FN$]; unset($this->registered$PROP_NAME_FN$s[$$$PROP_NAME_VAR$$IDENTIFIER_FN$]); return $$unRegistered$PROP_NAME_FN$; }" description="isRegistered, register, unregister" toReformat="false" toShortenFQNames="true">
<variable name="PROP_NAME_VAR" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="IDENTIFIER" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="PROP_TYPE" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="IDENTIFIER_FN" expression="capitalize(IDENTIFIER)" defaultValue="" alwaysStopAt="false" />
<variable name="PROP_NAME" expression="underscoresToSpaces(snakeCase(PROP_NAME_VAR))" defaultValue="" alwaysStopAt="false" />
<variable name="PROP_NAME_FN" expression="capitalize(PROP_NAME_VAR)" defaultValue="" alwaysStopAt="false" />
<context>
<option name="HTML_TEXT" value="false" />
<option name="HTML" value="false" />
<option name="XSL_TEXT" value="false" />
<option name="XML" value="false" />
<option name="SQL" value="false" />
<option name="JSP" value="false" />
<option name="CSS_PROPERTY_VALUE" value="false" />
<option name="CSS_DECLARATION_BLOCK" value="false" />
<option name="CSS_RULESET_LIST" value="false" />
<option name="CSS" value="false" />
<option name="CUCUMBER_FEATURE_FILE" value="false" />
<option name="JAVA_SCRIPT" value="false" />
<option name="CoffeeScript" value="false" />
<option name="HAML" value="false" />
<option name="OTHER" value="false" />
</context>
</template>
</templateSet>