| Conditions | 1 |
| Paths | 1 |
| Total Lines | 26 |
| Code Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 51 | private function generatePolicy() |
||
| 52 | { |
||
| 53 | $jsonPolicy = json_encode( |
||
| 54 | array( |
||
| 55 | 'expiration' => date('Y-m-d\TG:i:s\Z', strtotime($this->expireAt)), |
||
| 56 | 'conditions' => array( |
||
| 57 | array( |
||
| 58 | 'bucket' => $this->bucket, |
||
| 59 | ), |
||
| 60 | array( |
||
| 61 | 'acl' => $this->acl, |
||
| 62 | ), |
||
| 63 | array( |
||
| 64 | 'starts-with', |
||
| 65 | '$key', |
||
| 66 | '', |
||
| 67 | ), |
||
| 68 | array( |
||
| 69 | 'success_action_status' => (string)$this->successStatus, |
||
| 70 | ), |
||
| 71 | ), |
||
| 72 | ) |
||
| 73 | ); |
||
| 74 | |||
| 75 | return $jsonPolicy; |
||
| 76 | } |
||
| 77 | } |
||
| 78 |