Conditions | 2 |
Paths | 2 |
Total Lines | 24 |
Code Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
35 | protected function write(File $file, ResultSet $triggers) |
||
36 | { |
||
37 | $file->fwrite('DELIMITER ;;' . PHP_EOL . PHP_EOL); |
||
38 | |||
39 | $platform = $this->getPlatform(); |
||
40 | foreach ($triggers as $trigger) { |
||
41 | |||
42 | $file->fwrite( |
||
43 | sprintf( |
||
44 | 'CREATE TRIGGER %s %s %s ON %s FOR EACH ROW ' |
||
45 | . PHP_EOL . ' %s;;', |
||
46 | $platform->quoteIdentifier($trigger['Trigger']), |
||
47 | $trigger['Timing'], |
||
48 | $trigger['Event'], |
||
49 | $platform->quoteIdentifier($this->tableName), |
||
50 | $trigger['Statement'] |
||
51 | ) |
||
52 | . PHP_EOL . PHP_EOL |
||
53 | ); |
||
54 | } |
||
55 | |||
56 | $file->fwrite('DELIMITER ;' . PHP_EOL . PHP_EOL); |
||
57 | return $this; |
||
58 | } |
||
59 | } |
||
60 |