public function getSites($env = '', $includeSite404Table = false)
	{
		$select = $this->tableGateway->getSql()->select();
		
		$select->columns(array('*'));
	
		if($includeSite404Table) {
		    $select->join('melis_cms_site_domain', 'melis_cms_site_domain.sdom_site_id = melis_cms_site.site_id',
		        array('*'), $select::JOIN_LEFT)
		        ->join('melis_cms_site_404', 'melis_cms_site_404.s404_site_id = melis_cms_site.site_id',
		            array('*'), $select::JOIN_LEFT);
		}
		else {
		    $select->join('melis_cms_site_domain', 'melis_cms_site_domain.sdom_site_id = melis_cms_site.site_id',
		        array('*'), $select::JOIN_LEFT);
		}


		if ($env != '')
			$select->where("sdom_env = '$env'");
			
		$resultSet = $this->tableGateway->selectWith($select);
	
		return $resultSet;
	}
public function getSites($env = '', $includeSite404Table = false)
	{
		$select = $this->tableGateway->getSql()->select();
		
		$select->columns(array('*'));
	
		if($includeSite404Table) {
		    $select->join('melis_cms_site_domain', 'melis_cms_site_domain.sdom_site_id = melis_cms_site.site_id',
		        array('*'), $select::JOIN_LEFT)
		        ->join('melis_cms_site_404', 'melis_cms_site_404.s404_site_id = melis_cms_site.site_id',
		            array('*'), $select::JOIN_LEFT);
		}
		else {
		    $select->join('melis_cms_site_domain', 'melis_cms_site_domain.sdom_site_id = melis_cms_site.site_id',
		        array('*'), $select::JOIN_LEFT);
		}


		if ($env != '')
			$select->where("sdom_env = '$env'");
			
		$resultSet = $this->tableGateway->selectWith($select);
	
		return $resultSet;
	}
public function getSites ( $ env = '' , $ includeSite404Table = false ) { $ select = $ this -> tableGateway -> getSql ( ) -> select ( ) ; $ select -> columns ( array ( '*' ) ) ; if ( $ includeSite404Table ) { $ select -> join ( 'melis_cms_site_domain' , 'melis_cms_site_domain.sdom_site_id = melis_cms_site.site_id' , array ( '*' ) , $ select :: JOIN_LEFT ) -> join ( 'melis_cms_site_404' , 'melis_cms_site_404.s404_site_id = melis_cms_site.site_id' , array ( '*' ) , $ select :: JOIN_LEFT ) ; } else { $ select -> join ( 'melis_cms_site_domain' , 'melis_cms_site_domain.sdom_site_id = melis_cms_site.site_id' , array ( '*' ) , $ select :: JOIN_LEFT ) ; } if ( $ env != '' ) $ select -> where ( "sdom_env = '$env'" ) ; $ resultSet = $ this -> tableGateway -> selectWith ( $ select ) ; return $ resultSet ; }
Gets all the datas for a site

@param string $env MELIS_PLATFORM variable
@param boolean $includeSite404Table If true, gets the datas in 404 table
Gets all the datas for a site