<?php
namespace Portal\Mileage\Events;

use Portal\Mileage\Model\AuditTrail;

class AuditTrailMileage
{

	/**
     * Create a new event instance.
     *
     * @return void
     */
    public function __construct($id=NULL,$staffid=NULL,$mainapp=NULL,$content)
    {   
        $this->id = $id;
        $this->staffid = $staffid;
        $this->mainapp = $mainapp;
        $this->content = $this->AuditTrailMileage($id,$staffid,$mainapp,$content);
    }

    /**
     * undocumented function
     *
     * @return void
     * @author 
     **/
    public function AuditTrailMileage($id,$staffid,$mainapp,$content)
    {
    	$save = new AuditTrail;
    	$save->user_id = $id;
    	$save->staff_id = $staffid;
    	$save->main_app = $mainapp;
    	$save->description = $content;
    	$save->save();

    }


}