소스 검색

Update trigger faq

François Pluchino 13 년 전
부모
커밋
1699b5c338
1개의 변경된 파일21개의 추가작업 그리고 0개의 파일을 삭제
  1. 21 0
      doc/faqs/triggers.md

+ 21 - 0
doc/faqs/triggers.md

@@ -42,6 +42,27 @@ For any given project:
 }
 ```
 
+Trigger Example:
+```php
+<?php
+namespace MyVendor\MyRootPackage;
+
+use Composer\Trigger\TriggerEvent;
+
+class MyClass
+{
+    public static function myStaticMethod(TriggerEvent $event)
+    {
+        // code...
+    }
+    
+    public static function myStaticMethod2(TriggerEvent $event)
+    {
+        // code...
+    }
+}
+```
+
 ## Informations:
 
 A declared trigger with non existent file will be ignored.