PHP Classes

File: QueryTemplatesSourceReplicator.php

Recommend this page to a friend!
  Classes of   Query Templates   QueryTemplatesSourceReplicator.php   Download  
File: QueryTemplatesSourceReplicator.php
Role: Class source
Content type: text/plain
Description: QueryTemplatesSourceReplicator.php
Class: Query Templates
Template engine using load, traverse and modify
Author: By
Last change:
Date: 14 years ago
Size: 985 bytes


Class file image Download
 * Class used to store calls to source object for later
 * replication.
 * @access private
 * @package QueryTemplates
 * @author Tobiasz Cudnik <tobiasz.cudnik/>
 * @license MIT License
 * @link
class QueryTemplatesSourceReplicator {
$calls = array();
    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);