TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 03-24-2010, 09:28 PM   #1 (permalink)
The Wanderer
 
Join Date: Jun 2009
Posts: 7
Thanks: 0
fantomel is on a distinguished road
Default small template engine

hello i`m trying to build a small simple parser data from controller to the view but i`m including my files using another function in another class and i would like to use the parse function from bellow code there but without including the file from the parser function i want to include it separated but i can't succeed in doing that can someone please help me i can't figure out by my self why i can't do that. :(

PHP Code:
class View
{
    public 
$values = array();

    public function 
set($key$value)
    {
    
$this->values[$key] = $value;
    }

    public function 
parse()
    {
        if(
is_array($this->values))
        {
            
extract($this->valuesEXTR_OVERWRITE);
        }
        include(
'index.php');
    }

fantomel is offline  
Reply With Quote
 



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
what is best template engine? hostpeyma Script Giveaway 7 10-27-2009 05:21 AM
Template Engine hello-world General 20 03-18-2009 01:51 PM
Pure PHP template class. abiko Advanced PHP Programming 1 04-02-2008 05:45 PM
MySQLs new storage engine Alan @ CIT MySQL & Databases 0 01-29-2008 10:58 PM
Need your feedback Tanax Absolute Beginners 29 10-11-2007 04:50 PM


All times are GMT. The time now is 06:06 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design