PHP Classes
Icontem

File: QueryTemplatesSourceReplicator.php


  Search   All class groups All class groups   Latest entries Latest entries   Top 10 charts Top 10 charts   Newsletter Newsletter   Blog Blog   Forums Forums   Help FAQ Help FAQ  
  Login   Register  
Recommend this page to a friend! ReTweet ReTweet Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Tobiasz Cudnik  >  Query Templates  >  QueryTemplatesSourceReplicator.php  
File: QueryTemplatesSourceReplicator.php
Role: Class source
Content type: text/plain
Description: QueryTemplatesSourceReplicator.php
Class: Query Templates
Template engine using load, traverse and modify
 

Contents

Class file image Download
<?php
/**
 * Class used to store calls to source object for later
 * replication.
 *
 * @access private
 * @package QueryTemplates
 * @author Tobiasz Cudnik <tobiasz.cudnik/gmail.com>
 * @license http://www.opensource.org/licenses/mit-license.php MIT License
 * @link http://code.google.com/p/querytemplates/
 */
class QueryTemplatesSourceReplicator {
    
public $calls = array();
    
public $parent;
    
public function __construct($parent) {
        
$this->parent $parent;
    }
    
public function __call($name$arguments) {
        
$parentMethods = array(
            
'source''sourceQuery''sourcePHP''sourceQueryPHP''parse''noCache'
        
);
        if (
in_array($name$parentMethods))
            
// call parent method
            
return call_user_method_array($name$this->parent$arguments);
        
$endingMethods = array('sourceEnd');
        if (
in_array($name$endingMethods))
            
// we're ended
            
return $this->parent;
        
// store call
        
$this->calls[] = array($name$arguments);
        return 
$this;
    }
}

 
  Advertise on this site Advertise on this site   Site map Site map   Statistics Statistics   Site tips Site tips   Privacy policy Privacy policy   Contact Contact  

For more information send a message to :
info at phpclasses dot org.
Copyright (c) Icontem 1999-2009 PHP Classes - PHP Class Scripts
  PHP Book Reviews - Reviews of books and other products