Skip to content

Commit

Permalink
Added Event snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
patricksamson committed Jul 11, 2015
1 parent b2b1e89 commit cb0be09
Show file tree
Hide file tree
Showing 14 changed files with 98 additions and 2 deletions.
8 changes: 8 additions & 0 deletions Event/Event-createClassListener.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<snippet>
<content><![CDATA[
Event::createClassListener(${1:listener})
]]></content>
<tabTrigger>Event::createClassListener</tabTrigger>
<scope>source.php, source.html</scope>
<description>Create a class based listener using the IoC container.</description>
</snippet>
8 changes: 8 additions & 0 deletions Event/Event-fire.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<snippet>
<content><![CDATA[
Event::fire(${1:event}, ${2:payload}, ${3:halt});
]]></content>
<tabTrigger>Event::fire</tabTrigger>
<scope>source.php, source.html</scope>
<description>Fire an event and call the listeners.</description>
</snippet>
8 changes: 8 additions & 0 deletions Event/Event-firing.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<snippet>
<content><![CDATA[
Event::firing()
]]></content>
<tabTrigger>Event::firing</tabTrigger>
<scope>source.php, source.html</scope>
<description>Get the event that is currently firing.</description>
</snippet>
8 changes: 8 additions & 0 deletions Event/Event-flush.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<snippet>
<content><![CDATA[
Event::flush(${1:event});
]]></content>
<tabTrigger>Event::flush</tabTrigger>
<scope>source.php, source.html</scope>
<description>Flush a set of pushed events.</description>
</snippet>
8 changes: 8 additions & 0 deletions Event/Event-forget.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<snippet>
<content><![CDATA[
Event::forget(${1:event});
]]></content>
<tabTrigger>Event::forget</tabTrigger>
<scope>source.php, source.html</scope>
<description>Remove a set of listeners from the dispatcher.</description>
</snippet>
8 changes: 8 additions & 0 deletions Event/Event-getListeners.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<snippet>
<content><![CDATA[
Event::getListeners(${1:eventName});
]]></content>
<tabTrigger>Event::getListeners</tabTrigger>
<scope>source.php, source.html</scope>
<description>Get all of the listeners for a given event name.</description>
</snippet>
8 changes: 8 additions & 0 deletions Event/Event-hasListeners.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<snippet>
<content><![CDATA[
Event::hasListeners(${1:eventName});
]]></content>
<tabTrigger>Event::hasListeners</tabTrigger>
<scope>source.php, source.html</scope>
<description>Determine if a given event has listeners.</description>
</snippet>
8 changes: 8 additions & 0 deletions Event/Event-listen.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<snippet>
<content><![CDATA[
Event::listen(${1:events}, ${2:listener}, ${3:priority});
]]></content>
<tabTrigger>Event::listen</tabTrigger>
<scope>source.php, source.html</scope>
<description>Register an event listener with the dispatcher.</description>
</snippet>
8 changes: 8 additions & 0 deletions Event/Event-makeListener.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<snippet>
<content><![CDATA[
Event::makeListener(${1:listener});
]]></content>
<tabTrigger>Event::makeListener</tabTrigger>
<scope>source.php, source.html</scope>
<description>Register an event listener with the dispatcher.</description>
</snippet>
8 changes: 8 additions & 0 deletions Event/Event-push.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<snippet>
<content><![CDATA[
Event::push(${1:event}, ${2:payload});
]]></content>
<tabTrigger>Event::push</tabTrigger>
<scope>source.php, source.html</scope>
<description>Register an event and payload to be fired later.</description>
</snippet>
8 changes: 8 additions & 0 deletions Event/Event-subscribe.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<snippet>
<content><![CDATA[
Event::subscribe(${1:subscriber});
]]></content>
<tabTrigger>Event::subscribe</tabTrigger>
<scope>source.php, source.html</scope>
<description>Register an event subscriber with the dispatcher.</description>
</snippet>
8 changes: 8 additions & 0 deletions Event/Event-until.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<snippet>
<content><![CDATA[
Event::until(${1:event}, ${2:payload})
]]></content>
<tabTrigger>Event::until</tabTrigger>
<scope>source.php, source.html</scope>
<description>Fire an event until the first non-null response is returned.</description>
</snippet>
2 changes: 1 addition & 1 deletion Log/Log-useDailyFiles.sublime-snippet
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<snippet>
<content><![CDATA[
Log::useDailyFiles(${1:path}, ${2:days}, ${3:level})
Log::useDailyFiles(${1:path}, ${2:days}, ${3:level});
]]></content>
<tabTrigger>Log::useDailyFiles</tabTrigger>
<scope>source.php, source.html</scope>
Expand Down
2 changes: 1 addition & 1 deletion Log/Log-useFiles.sublime-snippet
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<snippet>
<content><![CDATA[
Log::useFiles(${1:path}, ${2:level})
Log::useFiles(${1:path}, ${2:level});
]]></content>
<tabTrigger>Log::useFiles</tabTrigger>
<scope>source.php, source.html</scope>
Expand Down

0 comments on commit cb0be09

Please sign in to comment.