<?php

class BlueMedia {
	
	var $bmGate;
	var $bmServiceId;
	var $bmKey;
	var $bmFunction;
	
	function __construct(){
		$this->bmGate = $GLOBALS['config']['bluemedia_website_gate'];
		$this->bmServiceId = $GLOBALS['config']['bluemedia_service_id'];
		$this->bmKey = $GLOBALS['config']['bluemedia_key'];
		$this->bmFunction = $GLOBALS['config']['bluemedia_function'];
	}
	
	function checkSettings(){
		return ( !isset( $bmGate ) && !isset( $bmServiceId ) && !isset( $bmKey ) && !isset( $bmFunction ) ) ? true : false;
	}
	
	function saveLog( $aData, $aReturn ){
		file_put_contents( 'logs/bluemedia_log.txt', var_export( array( $aData, $aReturn ), true ), FILE_APPEND );
	}
	
}

?>