Location: PHPKode > scripts > ooeLite > ooelite/ooeLite.class.php
<?php
/**
* Classe que retorna os metodos que devem ser utilizados 
* implementando as diversas interfaces
* @author Marcelo Soares da Costa
* @email phpmafia at yahoo dot com dot br
* @copyright Marcelo Soares da Costa © 2007/2009.
* @license FreeBSD http://www.freebsd.org/copyright/freebsd-license.html
* @version 2.0
* @access public
* @package OOE
* @chagelog 2009-07-02 Port for OOE Framework V2.0
* @data 2009-07-02
*/
################################################################################

class ooeLite extends ooeInheritance{

	private $objSql = false;
	private $objTT = false;
	private $objSS = false;
	private $String;
	private $template;
	private $compress;
	private $tagName;
	private $tag;
	private $content;
	private $param;
	private $array = array ();

/******* ooePDO
	/**
	* Cria uma referencia para o objeto de conexão do banco de dados
	* @access private
	*/
	
	private static function __sqlQuery() {
		return parent :: callClassParent('ooePDO');
	}
	
	/**
	* Verifica a referencia para o objeto sqlQuery
	* @access private
	*/
	
	private function __checkObjSql() {
		if ($this->objSql == false) {
			$this->objSql = self :: __sqlQuery();
		}
	}

	/**
	* Importa o metodo prepareSQL
	* @access public
	*/
	
	final public function prepareSQL($String) {
		self :: __checkObjSql();
		return $this->objSql->prepareSQL($String);
	}
	
	/**
	* Importa o metodo executeSql
	* @access public
	*/
	
	final public function executeSql($String) {
		self :: __checkObjSql();
		return $this->objSql->executeSql($String);
	}
	
	/**
	* Importa o metodo execStatment
	* @access public
	*/
	
	final public function execStatment($String) {
		self :: __checkObjSql();
		return $this->objSql->execStatment($String);
	}
	
	/**
	* Importa o metodo getAssocArray
	* @access public
	*/
	
	final public function getAssocArray() {
		self :: __checkObjSql();
		return $this->objSql->getAssocArray();
	}
	
	/**
	* Importa o metodo getLineArray
	* @access public
	*/
	
	final public function getLineArray() {
		self :: __checkObjSql();
		return $this->objSql->getLineArray();
	}
	
	/**
	* Importa o metodo getRow
	* @access public
	*/
	
	final public function getRow() {
	self :: __checkObjSql();
		return $this->objSql->getRow();
	}

	/**
	* Importa o metodo beginTransaction
	* @access public
	*/
	
	final public function beginTransaction() {
		self :: __checkObjSql();
		return $this->objSql->beginTransaction();
	}
	
	/**
	* Importa o metodo commit
	* @access public
	*/
	
	final public function commit() {
	   self :: __checkObjSql();
		return $this->objSql->commit();
	}
	
	/**
	* Importa o metodo rollBack
	* @access public
	*/
	
	final public function rollBack() {
	   self :: __checkObjSql();
		return $this->objSql->rollBack();
	}

/******* TagTemplate */
	/**
	* Cria uma referencia para o objeto tagTemplate
	* @access private
	*/
	
	private static function __tagTemplate() {
		return parent :: callClassParent('ooeTagTemplate');
	}

	/**
	* Verifica a referencia para o objeto tagTemplate
	* @access private
	*/
	
	private function __checkObjTT() {
		if ($this->objTT == false) {
			$this->objTT = self::__tagTemplate();
		}
	}
	/**
	* Importa um template e o insere no contexto
	* @access public
	* @input archive [file]
	* @return compress buffer output 
	*/
	
   final public function useTemplate($template,$compress=5){
   ob_start();
   include_once($template);
   $result = ob_get_contents();
   ob_end_clean();
   echo ob_gzhandler(trim($result),$compress);
   }

	/**
	* Importa o metodo setTagContent <tag>content</tag>
	* @access public
	* @input args
	* @return tag object
	*/
	
   final public function setTagContent($tagName,$tag,$content,$param=null){
   self::__checkObjTT();
   return $this->objTT->setTagContent($tagName,$tag,$content,$param);
   }
   
  /**
	* Importa o metodo setTagSimple <tag/>
	* @access public
	* @input args
	* @return tag object
	*/
	
   final public function setTagSimple($tagName,$tag,$param=null){
   self::__checkObjTT();
   return $this->objTT->setTagSimple($tagName,$tag,$param);
   }
   
  /**
	* Importa o metodo getTag
	* @access public
	* @input tagname
	* @return fomated tag
	*/
	
   final public function getTag($tagName){
   self::__checkObjTT();
   return $this->objTT->getTag($tagName);
   }
   
	/**
	* Importa um arquivo e o insere no contexto
	* @access public
	* @input archive [file]
	* @return void
	*/
   final public function plugin($arquivo){
   include_once($arquivo);
   }	
   
/******* SecuritySession

	/**
	*
	* Cria uma referencia para o objeto SecuritySession
	* @access private
	*
	*/
	
	private static function __securitySession() {
		return parent :: callClassParent('ooeSecuritySession');
	}

	/**
	*
	* Verifica a referencia para o objeto securitySession
	* @access private
	*
	*/
	
	private function __checkObjSS() {
		if ($this->objSS == false) {
			$this->objSS = self :: __securitySession();
		}
	}
	
	/**
	*
	* Importa o metodo newServerKey
	* @access public
	*
	*/
	
	final public function newServerKey() {
		self :: __checkObjSS();
		return $this->objSS->newServerKey();
	}

	/**
	*
	* Importa o metodo registerSession
	* @access public
	*
	*/
	
	final public function registerSession() {
		self :: __checkObjSS();
		try {
			return $this->objSS->registerSession();
		} catch (Exception $e) {
			return $e->getMessage();
		}
	}

	/**
	*
	* Importa o metodo checkSession
	* @access public
	*
	*/
	
	final public function checkSession() {
		self :: __checkObjSS();
		try {
			$this->objSS->checkSession();
		} catch (Exception $e) {
			return $e->getMessage();
		}
	}
	
}
?>
Return current item: ooeLite