PHP:
<?php
/**
* @Company - Parallax Technologies
* @Description - Two vacancies currently available for the
* positions of Trainee PHP & AngularJS developers.
* @Added on - 18th of March, 2016
* @Expires on - 31st of March, 2016
*
* TODO: Please call the apply function with your appropriate vacancy object.
*/
class Vacancy {
var $position;
var $description;
var $requirments = [];
var $mail_driver;
const CONTACT_EMAIL = “[email protected]”;
const CONTACT_PHONE = “+94779436364”;
public function __construct(Mail $mail_driver) {
$this->mail_driver = $mail_driver;
}
public function setPosition($position) {
$this->position = $position;
}
public function setDescription($description) {
$this->description = $description;
}
public function setRequiments(Array $requirments) {
$this->requirments = $requirments;
}
public function apply($resume, $body) {
var $to = SELF::CONTACT_EMAIL;
$this->attach($resume); // Attach your latest Resume.
// Call this with $body = 'Your covering letter.'
$this->mail_driver->send($to, $body);
}
}
$requiments = [
'Must passionate in Programming',
'Should have done some cool experiments in Programming',
]);
$mail = new Mail();
$angularVacancy = new Vacancy($mail);
$angularVacancy->setPosition('Trainee AngularJS Developer');
$angularVacancy->setDescription('blah blah..... ');
$angularVacancy->setRequiments($requiments);
$phpVacancy = new Vacancy($mail);
$phpVacancy->setPosition('Trainee PHP Developer');
$phpVacancy->setDescription('blah blah..... ');
$phpVacancy->setRequiments($requiments);
Last edited:

