-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathModifier.php
More file actions
34 lines (31 loc) · 721 Bytes
/
Copy pathModifier.php
File metadata and controls
34 lines (31 loc) · 721 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
require_once("DOCx.php");
/**
* Class Modifier
*
* @author Nicholas Sabelli
*/
class Modifier
{
/**
* Modifier constructor.
*
* @param $template
* @param $company
* @param $position
*/
function __construct($template, $company, $position)
{
$modifier = new DOCx($template);
$date = date("F j, Y");
$values = [
"{{company}}" => $company,
"{{position}}" => $position,
"{{date}}" => $date,
];
$filename = "Nicholas Sabelli to $company Regarding $position.docx";
$modifier->setValues($values);
$modifier->save($filename);
$modifier->close();
}
}