<?php 
/* 
============================================================================================================================================= 
|   This file is part of a project released under the terms of the Xyndravandria PHP License (XyndravandriaPHPLicense.txt).                 | 
|                                                                                                                                           | 
|   You should be given a copy of the Xyndravandria PHP License (XyndravandriaPHPLicense.txt) within the same directory as the README.md;   | 
|   if not, you can get a copy at http://Xyndravandria.ohost.de/XyndravandriaPHPLicense.txt .                                               | 
|                                                                                                                                           | 
|   The copyright (c) of this project is owned by Mauro Di Girolamo <[email protected]>.                                              | 
============================================================================================================================================| 
 
 
 
Xyndravandria Dyverath 
---------------------- 
Alpha 0.0.0 
 
Xyndravandria is the name of a collection of projects designed and developed by Mauro Di Girolamo ([email protected]); he is therefore the copyright (c) owner of Xyndravandria itself and all of its projects. 
 
Xyndravandria Dyverath is released under the terms of the Xyndravandria PHP License (XyndravandriaPHPLicense.txt). You should be given a copy of the Xyndravandria PHP License (XyndravandriaPHPLicense.txt) within the same directory as the README.md; if not, you can get a copy at http://Xyndravandria.ohost.de/XyndravandriaPHPLicense.txt . There might be a release under a freer license for a later, more stable version. 
 
The documentation is either included in ./admin_media/Documentation/ or can be read at http://Xyndravandria.ohost.de/Dyverath/Documentation/. 
 
All projects: 
 
   Xyndravandria Averazain 
   http://github.com/MauroDiGirolamo/Xyndravandria_Averazain 
   PHP 
   Averazain is an Ajax framework supporting also JavaScript disabled clients perfectly - including search engines like Google. 
    
   Xyndravandria Dyverath 
   http://github.com/MauroDiGirolamo/Xyndravandria_Dyverath 
   PHP 
   Dyverath is a database access wrapper. 
    
   Xyndravandria Erozaver 
   http://github.com/MauroDiGirolamo/Xyndravandria_Erozaver 
   PHP 
   Erozaver is a class extending the type hinting given by the PHP engine (additional support for basic type hinting and size constraints). 
    
   Xyndravandria Mondraviel 
   http://github.com/MauroDiGirolamo/Xyndravandria_Mondraviel 
   PHP 
   Mondraviel is a class used to separate HTML from PHP code by firstly register models - files containing place holders embedded in HTML code - and then later fill them dynamically with content by passing values for the place holders. 
*/ 
 
namespace Xyndravandria\Dyverath\Query\Component\Statement\StatementListing; 
 
use Xyndravandria\Dyverath\Table; 
use Xyndravandria\Dyverath\Query\Component\Component; 
use Xyndravandria\Erozaver\XyndravandriaDyverathException; 
 
/// A class representing a StatementListing. 
/// @abstract 
abstract class StatementListing extends Component { 
    
   /// The @ref Statement "Statements" of the 
   /// StatementListing. 
   /// <dl class = "type"><dt><b>%Type:</b></dt> 
   /// <dd>array of Statement</dd></dl> 
   /// @protected 
   protected $Statements = array( ); 
    
   /// Returns StatementListing::$Statements. 
   /// @public  
   /// @returns array of Statement 
   public function Statements( ) { 
      return $this->Statements; 
   } 
    
   /// Creates a new StatementListing. 
   /// @public  
   /// @param array $Statements: The @ref Statement 
   /// "Statements" of the StatementListing. 
   public function __construct( array $Statements = array( ) ) { 
      // TODO: Verificate that $Statments contains an array of Statement objects. 
      if( ! $this->ValidStatements( $Statements ) ) 
         throw new XyndravandriaDyverathException( 'Invalid $Statements.' ); 
      else 
         $this->Statements = $Statements; 
      return; 
   } 
    
    
   /// Optimises a StatementListing. 
   /// @public 
   /// @param Table $Table: The Table used to optimise. 
   public function Optimise( Table $Table ) { 
      foreach( $this->Statements as $Statement ) 
         if( $Statement instanceof Column ) 
            $Statement->Optimise( $Table ); 
      return; 
   } 
 
   // TODO: Delete method for good? 
   /* 
   /// Appends a Statement to a StatementListing.  
   /// @public  
   /// @param Statement $Statement: The Statement to be 
   /// appended. 
   public function AppendStatement( Statement $Statement ) { 
      $this->Statements[ ] = $Statement; 
      return; 
   } 
   */ 
 
   /// To be implemented in a sub class. 
   abstract protected function ValidStatements( array $Statements ); 
 
} 
?> 
 
 |