<?php

//require_once("interfaces/coreErrorsHandlerInterface.php");

// implements coreErrorsHandlerInterface
class logCoreErrorHandler 
{

// protected properties

	protected $_errors;
	protected $_file;
	
	public function errMesg($error)
	{
		if($error != '') 
		{
		$this->_errors = $error;
		return $this->_errors;
		}else{
		throw new Exception('Error Message Should be Filled');
		}
	}
	
	public function isFile($file)
	{
		if(is_string($file))
		{
			$this->_file = $file;
			return $this;
			
		}else{
		throw new Exception('File does not exist');
		}
	}

	public function logHandler($error, $file)
	{
		$this->_file = $file;
		return error_log($this->errMesg($error), 3, $this->_file);
		
		
	}


} // end class
?>