Skip to content

Commit

Permalink
added the initial sandbox
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Feb 17, 2010
0 parents commit 355e57a
Show file tree
Hide file tree
Showing 780 changed files with 107,543 additions and 0 deletions.
19 changes: 19 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2004-2010 Fabien Potencier

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
41 changes: 41 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
README
======

What is Symfony?
----------------

Symfony is a PHP 5.3 full-stack web framework. It is written with speed and
flexibility in mind. It allows developers to built better and easy to maintain
websites with PHP.

Symfony can be used to develop all kind of websites, from your personal blog
to hight traffic ones like Dailymotion or Yahoo! Answers.

High Performance
----------------

Built with performance in mind, Symfony 2 is one of the fastest PHP framework.
It is up to 3 times faster than symfony 1.4 or Zend Framework 1.10 and
consumes half the memory.

Requirements
------------

Symfony is only supported on PHP 5.3.0 and up. To check the compatibility of
your environment with Symfony, you can run the `web/check.php` script, bundled
with this sandbox.

Documentation
-------------

Symfony 2.0 is still in the early stages of development, but the "[Quick Tour][1]"
tutorial can get you started fast.

The "Quick Tour" tutorial barely scratches the surface of Symfony 2.0 but it
gives you a first feeling of the framework. If like us you think that Symfony
2.0 can be of great help to speed up your development and take the quality of
your work to the next level, visit the official [Symfony 2 website][2] to
learn about it.

[1]: http://symfony-reloaded.org/learn
[2]: http://symfony-reloaded.org/
20 changes: 20 additions & 0 deletions create_sandbox.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/sh

DIR=`pwd`
rm -rf /tmp/sandbox
mkdir /tmp/sandbox
cp -r hello /tmp/sandbox/
cp -r src /tmp/sandbox/
cp -r web /tmp/sandbox/
cp -r README /tmp/sandbox/
cp -r LICENSE /tmp/sandbox/
cd /tmp/sandbox
sudo rm -rf create_sandbox.sh hello/cache/* hello/logs/* .git*
chmod 777 hello/cache hello/logs
cd ..
# avoid the creation of ._* files
export COPY_EXTENDED_ATTRIBUTES_DISABLE=true
export COPYFILE_DISABLE=true
tar zcpf $DIR/sandbox_2_0_PR1.tgz sandbox
rm $DIR/sandbox_2_0_PR1.zip
zip -rq $DIR/sandbox_2_0_PR1.zip sandbox
1 change: 1 addition & 0 deletions hello/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
deny from all
51 changes: 51 additions & 0 deletions hello/HelloKernel.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?php

require_once __DIR__.'/../src/autoload.php';
require_once __DIR__.'/../src/vendor/symfony/src/Symfony/Foundation/bootstrap.php';

use Symfony\Foundation\Kernel;
use Symfony\Components\DependencyInjection\Loader\YamlFileLoader as ContainerLoader;
use Symfony\Components\Routing\Loader\YamlFileLoader as RoutingLoader;

class HelloKernel extends Kernel
{
public function registerRootDir()
{
return __DIR__;
}

public function registerBundles()
{
return array(
new Symfony\Foundation\Bundle\KernelBundle(),
new Symfony\Framework\WebBundle\Bundle(),
new Symfony\Framework\ZendBundle\Bundle(),
new Symfony\Framework\SwiftmailerBundle\Bundle(),
new Symfony\Framework\DoctrineBundle\Bundle(),
new Application\HelloBundle\Bundle(),
);
}

public function registerBundleDirs()
{
return array(
'Application' => __DIR__.'/../src/Application',
'Bundle' => __DIR__.'/../src/Bundle',
'Symfony\\Framework' => __DIR__.'/../src/vendor/symfony/src/Symfony/Framework',
);
}

public function registerContainerConfiguration()
{
$loader = new ContainerLoader($this->getBundleDirs());

return $loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml');
}

public function registerRoutes()
{
$loader = new RoutingLoader($this->getBundleDirs());

return $loader->load(__DIR__.'/config/routing.yml');
}
}
Empty file added hello/cache/.symfony
Empty file.
3 changes: 3 additions & 0 deletions hello/config/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
kernel.config: ~
web.web: ~
web.templating: ~
10 changes: 10 additions & 0 deletions hello/config/config_dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
imports:
- { resource: config.yml }

web.debug:
exception: %kernel.debug%
toolbar: %kernel.debug%

zend.logger:
priority: info
path: %kernel.root_dir%/logs/%kernel.environment%.log
2 changes: 2 additions & 0 deletions hello/config/config_prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
imports:
- { resource: config.yml }
6 changes: 6 additions & 0 deletions hello/config/routing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
homepage:
pattern: /
defaults: { _bundle: WebBundle, _controller: Default, _action: index }

hello:
resource: HelloBundle/Resources/config/routing.yml
11 changes: 11 additions & 0 deletions hello/console
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env php
<?php

require_once __DIR__.'/HelloKernel.php';

use Symfony\Framework\WebBundle\Console\Application;

$kernel = new HelloKernel('dev', true);

$application = new Application($kernel);
$application->run();
Empty file added hello/logs/.symfony
Empty file.
1 change: 1 addition & 0 deletions src/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
deny from all
9 changes: 9 additions & 0 deletions src/Application/HelloBundle/Bundle.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

namespace Application\HelloBundle;

use Symfony\Foundation\Bundle\Bundle as BaseBundle;

class Bundle extends BaseBundle
{
}
13 changes: 13 additions & 0 deletions src/Application/HelloBundle/Controller/HelloController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace Application\HelloBundle\Controller;

use Symfony\Framework\WebBundle\Controller;

class HelloController extends Controller
{
public function indexAction($name)
{
return $this->render('HelloBundle:Hello:index', array('name' => $name));
}
}
3 changes: 3 additions & 0 deletions src/Application/HelloBundle/Resources/config/routing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
hello:
pattern: /hello/:name
defaults: { _bundle: HelloBundle, _controller: Hello, _action: index }
3 changes: 3 additions & 0 deletions src/Application/HelloBundle/Resources/views/Hello/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?php $view->extend('HelloBundle::layout') ?>

Hello <?php echo $name ?>!
9 changes: 9 additions & 0 deletions src/Application/HelloBundle/Resources/views/layout.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<?php $view->slots->output('_content') ?>
</body>
</html>
Empty file added src/Bundle/.symfony
Empty file.
21 changes: 21 additions & 0 deletions src/autoload.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

require_once __DIR__.'/vendor/symfony/src/Symfony/Foundation/UniversalClassLoader.php';

use Symfony\Foundation\UniversalClassLoader;

$loader = new UniversalClassLoader();
$loader->registerNamespaces(array(
'Symfony' => __DIR__.'/vendor/symfony/src',
'Application' => __DIR__,
'Bundle' => __DIR__,
'Doctrine' => __DIR__.'/vendor/doctrine/lib',
));
$loader->registerPrefixes(array(
'Swift_' => __DIR__.'/vendor/swiftmailer/lib/classes',
'Zend_' => __DIR__.'/vendor/zend/library',
));
$loader->register();

// for Zend Framework & SwiftMailer
set_include_path(__DIR__.'/vendor/zend/library'.PATH_SEPARATOR.__DIR__.'/vendor/swiftmailer/lib'.PATH_SEPARATOR.get_include_path());
1 change: 1 addition & 0 deletions src/vendor/doctrine/CHANGELOG
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
xxxx
39 changes: 39 additions & 0 deletions src/vendor/doctrine/COPYRIGHT
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
Copyrights
----------

Doctrine
--------

Doctrine is a Object Relational Mapper built from scratch with PHP5. It contains a few ports of other popular PHP classes/libraries.

Url: http://www.doctrine-project.org
Copyright: 2005-2009 Konsta Vesterinen
License: LGPL - see LICENSE file

symfony
-------

Doctrine contains ports of a few symfony classes/libraries

Url: http://www.symfony-project.org
Copyright: Fabien Potencier
License: MIT - see LICENSE file

Zend Framework
--------------

Doctrine contains ports of a few Zend components and has borrowed concepts and ideas from the Zend Framework project.

Url: http://framework.zend.com
Copyright: Copyright © 2006-2009 by Zend Technologies, All rights reserved.
License: New BSD License

eZ Components
------------

Doctrine SchemaTool, Platforms and SchemaManagers borrow ideas and concepts
from ezcDatabaseSchema.

Url: http://www.ezcomponents.org
License: New BSD License
Copyright: Copyright (C) 2005-2009 eZ Systems AS. All rights reserved.
Loading

0 comments on commit 355e57a

Please sign in to comment.