src/bundles/Database/Handler.php
public static function _init() 
	{	
		if ( \ClanCats::in_development() ) 
		{ 
			// add a hook to the main resposne
			\CCEvent::mind( 'response.output', function( $output ) {
				
				if ( strpos( $output, '</body>' ) === false ) 
				{
					return $output;
				}
				
				$table = \UI\Table::create( array(
					 'style'		=> array(
					 	'width'	=> '100%',
					 ),
					 'cellpadding' 	=> '5',
					 'class'			=> 'table debug-table debug-table-db',
				));
				
				$table->header( array( '#', 'query' ) );
				
				foreach( static::log() as $key => $item )
				{
					$table->row( array( 
						$key+1,
						$item
					));
				}
			
				return str_replace( '</body>', $table."\n</body>", $output );
			});
		}
	}
public static function _init() 
	{	
		if ( \ClanCats::in_development() ) 
		{ 
			// add a hook to the main resposne
			\CCEvent::mind( 'response.output', function( $output ) {
				
				if ( strpos( $output, '</body>' ) === false ) 
				{
					return $output;
				}
				
				$table = \UI\Table::create( array(
					 'style'		=> array(
					 	'width'	=> '100%',
					 ),
					 'cellpadding' 	=> '5',
					 'class'			=> 'table debug-table debug-table-db',
				));
				
				$table->header( array( '#', 'query' ) );
				
				foreach( static::log() as $key => $item )
				{
					$table->row( array( 
						$key+1,
						$item
					));
				}
			
				return str_replace( '</body>', $table."\n</body>", $output );
			});
		}
	}
public static function _init ( ) { if ( \ ClanCats :: in_development ( ) ) { // add a hook to the main resposne \ CCEvent :: mind ( 'response.output' , function ( $ output ) { if ( strpos ( $ output , '</body>' ) === false ) { return $ output ; } $ table = \ UI \ Table :: create ( array ( 'style' => array ( 'width' => '100%' , ) , 'cellpadding' => '5' , 'class' => 'table debug-table debug-table-db' , ) ) ; $ table -> header ( array ( '#' , 'query' ) ) ; foreach ( static :: log ( ) as $ key => $ item ) { $ table -> row ( array ( $ key + 1 , $ item ) ) ; } return str_replace ( '</body>' , $ table . "\n</body>" , $ output ) ; } ) ; } }
Static init
When we are in development then we append the qurey log to body

@codeCoverageIgnore

@return void
Static init When we are in development then we append the qurey log to body