Created
August 5, 2011 15:35
-
-
Save weaverryan/1127786 to your computer and use it in GitHub Desktop.
Example of a "play" script in Symfony 1.4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// web/play.php | |
// guarantee that we're load and proud | |
ini_set('display_errors', true); | |
error_reporting(E_ALL); | |
require_once(dirname(__FILE__).'/../config/ProjectConfiguration.class.php'); | |
$configuration = ProjectConfiguration::getApplicationConfiguration('frontend', 'dev', true); | |
$context = sfContext::createInstance($configuration); | |
// down here you can do anything | |
// create some object | |
$reportingObj = new WhateverReportingClass('foo'); | |
// grab some stuff from the db | |
$product = Doctrine_Core::getTable('Product')->createQuery('p')->fetchOne(); | |
var_dump($reportingObj->reportOnSomething($product)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment