Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
41 | public function setContentFromCertFile($file) |
||
42 | { |
||
43 | $file = $this->stripProtocolNameFromCertFile($file); |
||
44 | |||
45 | if (!file_exists($file)) { |
||
46 | throw new \InvalidArgumentException( |
||
47 | sprintf("Certificate file named '%s' not exists.", $file) |
||
48 | ); |
||
49 | } |
||
50 | |||
51 | $stream = new FileStream($file, 'rb'); |
||
52 | $this->setContent($stream->getContents()); |
||
53 | } |
||
54 | |||
84 |