Skip to content

Commit f11ec0b

Browse files
committed
Added basic class with namespace snippet.
1 parent 43b272f commit f11ec0b

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

UltiSnips/php_symfony2.snippets

+22
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,28 @@
33

44
priority -50
55

6+
snippet classn "Basic class with namespace snippet" b
7+
namespace `!p
8+
abspath = os.path.abspath(path)
9+
m = re.search(r'[A-Z].+(?=/)', abspath)
10+
if m:
11+
snip.rv = m.group().replace('/', '\\')
12+
`;
13+
14+
/**
15+
* ${1:@author `whoami`}
16+
*/
17+
class `!p
18+
snip.rv = re.match(r'.*(?=\.)', fn).group()
19+
`$2
20+
{
21+
public function __construct(${3:$options})
22+
{
23+
${4:// code}
24+
}$0
25+
}
26+
endsnippet
27+
628
snippet contr "Symfony2 controller" b
729
namespace `!p
830
abspath = os.path.abspath(path)

0 commit comments

Comments
 (0)