classes/phing/tasks/ext/SmartyTask.php
public function setContextProperties($file)
    {
        $sources = explode(",", $file);
        $this->contextProperties = new Properties();

        // Always try to get the context properties resource
        // from a file first. Templates may be taken from a JAR
        // file but the context properties resource may be a
        // resource in the filesystem. If this fails than attempt
        // to get the context properties resource from the
        // classpath.
        for ($i = 0, $sourcesLength = count($sources); $i < $sourcesLength; $i++) {
            $source = new Properties();

            try {
                // resolve relative path from basedir and leave
                // absolute path untouched.
                $fullPath = $this->project->resolveFile($sources[$i]);
                $this->log("Using contextProperties file: " . $fullPath->__toString());
                $source->load($fullPath);
            } catch (Exception $e) {
                throw new BuildException(
                    "Context properties file " . $sources[$i] .
                    " could not be found in the file system!"
                );
            }

            $keys = $source->keys();

            foreach ($keys as $key) {
                $name = $key;
                $value = $this->project->replaceProperties($source->getProperty($name));
                $this->contextProperties->setProperty($name, $value);
            }
        }
    }
public function setContextProperties($file)
    {
        $sources = explode(",", $file);
        $this->contextProperties = new Properties();

        // Always try to get the context properties resource
        // from a file first. Templates may be taken from a JAR
        // file but the context properties resource may be a
        // resource in the filesystem. If this fails than attempt
        // to get the context properties resource from the
        // classpath.
        for ($i = 0, $sourcesLength = count($sources); $i < $sourcesLength; $i++) {
            $source = new Properties();

            try {
                // resolve relative path from basedir and leave
                // absolute path untouched.
                $fullPath = $this->project->resolveFile($sources[$i]);
                $this->log("Using contextProperties file: " . $fullPath->__toString());
                $source->load($fullPath);
            } catch (Exception $e) {
                throw new BuildException(
                    "Context properties file " . $sources[$i] .
                    " could not be found in the file system!"
                );
            }

            $keys = $source->keys();

            foreach ($keys as $key) {
                $name = $key;
                $value = $this->project->replaceProperties($source->getProperty($name));
                $this->contextProperties->setProperty($name, $value);
            }
        }
    }
public function setContextProperties ( $ file ) { $ sources = explode ( "," , $ file ) ; $ this -> contextProperties = new Properties ( ) ; // Always try to get the context properties resource // from a file first. Templates may be taken from a JAR // file but the context properties resource may be a // resource in the filesystem. If this fails than attempt // to get the context properties resource from the // classpath. for ( $ i = 0 , $ sourcesLength = count ( $ sources ) ; $ i < $ sourcesLength ; $ i ++ ) { $ source = new Properties ( ) ; try { // resolve relative path from basedir and leave // absolute path untouched. $ fullPath = $ this -> project -> resolveFile ( $ sources [ $ i ] ) ; $ this -> log ( "Using contextProperties file: " . $ fullPath -> __toString ( ) ) ; $ source -> load ( $ fullPath ) ; } catch ( Exception $ e ) { throw new BuildException ( "Context properties file " . $ sources [ $ i ] . " could not be found in the file system!" ) ; } $ keys = $ source -> keys ( ) ; foreach ( $ keys as $ key ) { $ name = $ key ; $ value = $ this -> project -> replaceProperties ( $ source -> getProperty ( $ name ) ) ; $ this -> contextProperties -> setProperty ( $ name , $ value ) ; } } }
Set the context properties that will be
fed into the initial context be the
generating process starts.

@param  string $file
@throws BuildException
@return void
Set the context properties that will be fed into the initial context be the generating process starts .