├── .gitignore ├── .travis.yml ├── LICENSE ├── README.md ├── app ├── .htaccess ├── AppCache.php ├── AppKernel.php ├── SymfonyRequirements.php ├── autoload.php ├── bootstrap.php.cache ├── check.php ├── config │ ├── config.yml │ ├── config_dev.yml │ ├── config_prod.yml │ ├── config_test.yml │ ├── parameters.yml │ ├── routing.yml │ └── routing_dev.yml ├── console └── phpunit.xml.dist ├── composer.json ├── composer.lock ├── src ├── .htaccess └── Terrific │ ├── Composition │ ├── Controller │ │ └── DefaultController.php │ ├── Resources │ │ ├── macros │ │ │ ├── .gitkeep │ │ │ └── forms.html.twig │ │ ├── public │ │ │ └── css │ │ │ │ ├── elements.less │ │ │ │ ├── grid.less │ │ │ │ └── reset.less │ │ └── views │ │ │ ├── Default │ │ │ └── index.html.twig │ │ │ └── base.html.twig │ └── TerrificComposition.php │ └── Module │ ├── .gitkeep │ ├── Hero │ ├── README.md │ ├── Resources │ │ ├── public │ │ │ ├── css │ │ │ │ ├── Hero.less │ │ │ │ └── skin │ │ │ │ │ └── Stealth.less │ │ │ └── js │ │ │ │ ├── Tc.Module.Hero.js │ │ │ │ └── skin │ │ │ │ └── Tc.Module.Hero.Stealth.js │ │ └── views │ │ │ ├── batman.html.twig │ │ │ ├── mrterrific.html.twig │ │ │ └── spiderman.html.twig │ └── TerrificModuleHero.php │ ├── Intro │ ├── README.md │ ├── Resources │ │ ├── public │ │ │ ├── css │ │ │ │ └── Intro.less │ │ │ ├── img │ │ │ │ └── einstein.png │ │ │ └── js │ │ │ │ └── Tc.Module.Intro.js │ │ └── views │ │ │ └── intro.html.twig │ └── TerrificModuleIntro.php │ └── Teaser │ ├── README.md │ ├── Resources │ ├── public │ │ ├── css │ │ │ └── Teaser.less │ │ ├── img │ │ │ └── transform.png │ │ └── js │ │ │ └── Tc.Module.Teaser.js │ └── views │ │ └── decorate.html.twig │ └── TerrificModuleTeaser.php └── web ├── .htaccess ├── app.php ├── app_dev.php ├── apple-touch-icon.png ├── config.php ├── css └── dependencies │ └── .gitkeep ├── favicon.ico ├── js └── dependencies │ └── .gitkeep └── robots.txt /.gitignore: -------------------------------------------------------------------------------- 1 | /web/bundles/ 2 | /web/css/compiled/ 3 | /web/js/compiled/ 4 | /app/cache/ 5 | /app/logs/ 6 | /build/ 7 | /vendor/ 8 | .DS_Store 9 | .idea/ -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: php 2 | 3 | php: 4 | - 5.3.3 5 | - 5.3 6 | - 5.4 7 | 8 | before_script: composer install 9 | 10 | script: phpunit -c app 11 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2004-2011 Fabien Potencier 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is furnished 8 | to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Terrific Composer 2 | ================= 3 | 4 | Welcome to the Terrific Composer - a Frontend Development Framework specifically 5 | designed for building top-notch frontends based on the [Terrific concept](http://www.terrifically.org/). 6 | 7 | This document contains information on how to download and start using Terrific Composer. 8 | Terrific Composer is built on top of Symfony2. For a more detailed explanation, see the [Installation][1] 9 | chapter of the Symfony Documentation. 10 | 11 | 1) Download the Terrific Composer 12 | --------------------------------- 13 | 14 | If you've already downloaded the Composer, and unpacked it somewhere 15 | within your web root directory, then move on to the "Installation" section. 16 | 17 | To download the Terrific Composer, you have two options: 18 | 19 | ### Download an archive file (*recommended*) 20 | 21 | The easiest way to get started is to download an archive of the Terrific Composer 22 | (http://www.terrifically.org/composer/). Unpack it somewhere under your web server root 23 | directory and you're done. The web root is wherever your web server (e.g. Apache) 24 | looks when you access `http://localhost` in a browser. 25 | 26 | ### Clone the git Repository 27 | 28 | I highly recommend that you download the archive file version of Terrific Composer. 29 | But if you want to use git, this is for you. 30 | 31 | Run the following commands: 32 | 33 | git clone http://github.com/brunschgi/terrific-composer.git 34 | cd terrific-composer 35 | rm -rf .git 36 | 37 | 2) Installation 38 | --------------- 39 | 40 | Once you've downloaded the Terrific Composer, installation is easy, and basically 41 | involves making sure your system is ready for Symfony2. 42 | 43 | ### a) Check your System Configuration 44 | 45 | Before you begin, make sure that your local system is properly configured 46 | for Symfony. To do this, execute the following: 47 | 48 | php app/check.php 49 | 50 | Make sure you pass the "Mandatory requirements" section. If you get any warnings or 51 | recommendations there, fix these now before moving on. 52 | if you want you can skip the warnings or recommendations in the "Optional checks" section. 53 | 54 | ### b) For Git Installers: Get the Vendor Libraries 55 | 56 | If you installed the Terrific Composer via git, then you need to download all of the necessary 57 | vendor libraries. If you're not sure if you need to do this, check to see if you have a ``vendor/`` directory. 58 | If you don't, or if that directory is empty, run the following: 59 | 60 | php composer.phar install 61 | 62 | If you don't have Composer yet, download it following the instructions on 63 | http://getcomposer.org/ or just run the following command: 64 | 65 | curl -s https://getcomposer.org/installer | php 66 | 67 | Note that you **must** have git installed and be able to execute the `git` 68 | command to execute this script. If you don't have git available, either install 69 | it or download the archive of Terrific Composer from (http://www.terrifically.org/composer/). 70 | 71 | ### c) Access the Application via the Browser 72 | 73 | Congratulations! You're now ready to use Terrific Composer. If you've unzipped Terrific Composer 74 | in the web root of your computer, then you should be able to access the welcome page via: 75 | 76 | http://localhost/terrific-composer/web/ 77 | 78 | 79 | 3) Learn about Terrific Composer! 80 | --------------------------------- 81 | 82 | The Terrific Composer is meant to be the starting point for building your Frontends, 83 | but it also contains some sample code that you can learn from and play with. 84 | 85 | If you have problems or want to know more about the underlying Symfony2, a great way to start learning 86 | is via the [Symfony2 Quick Tour](http://symfony.com/doc/current/quick_tour/the_big_picture.html), 87 | which will take you through all the basic features of Symfony2 88 | 89 | Once you're feeling good, you can move onto reading the official 90 | [Symfony2 book](http://symfony.com/doc/current/). 91 | 92 | Enjoy! 93 | -------------------------------------------------------------------------------- /app/.htaccess: -------------------------------------------------------------------------------- 1 | deny from all -------------------------------------------------------------------------------- /app/AppCache.php: -------------------------------------------------------------------------------- 1 | directories()->in($dir)->depth('== 0'); 30 | 31 | foreach ($finder as $file) { 32 | $filename = $file->getFilename(); 33 | $module = 'Terrific\Module\\'.$filename.'\TerrificModule'.$filename; 34 | $bundles[] = new $module(); 35 | } 36 | 37 | if (in_array($this->getEnvironment(), array('dev', 'test'))) { 38 | // here comes your dev & test only dependencies 39 | $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle(); 40 | } 41 | 42 | return $bundles; 43 | } 44 | 45 | public function registerContainerConfiguration(LoaderInterface $loader) 46 | { 47 | $loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml'); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /app/SymfonyRequirements.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | /* 13 | * Users of PHP 5.2 should be able to run the requirements checks. 14 | * This is why the file and all classes must be compatible with PHP 5.2+ 15 | * (e.g. not using namespaces and closures). 16 | * 17 | * ************** CAUTION ************** 18 | * 19 | * DO NOT EDIT THIS FILE as it will be overriden by Composer as part of 20 | * the installation/update process. The original file resides in the 21 | * SensioDistributionBundle. 22 | * 23 | * ************** CAUTION ************** 24 | */ 25 | 26 | /** 27 | * Represents a single PHP requirement, e.g. an installed extension. 28 | * It can be a mandatory requirement or an optional recommendation. 29 | * There is a special subclass, named PhpIniRequirement, to check a php.ini configuration. 30 | * 31 | * @author Tobias Schultze 32 | */ 33 | class Requirement 34 | { 35 | private $fulfilled; 36 | private $testMessage; 37 | private $helpText; 38 | private $helpHtml; 39 | private $optional; 40 | 41 | /** 42 | * Constructor that initializes the requirement. 43 | * 44 | * @param Boolean $fulfilled Whether the requirement is fulfilled 45 | * @param string $testMessage The message for testing the requirement 46 | * @param string $helpHtml The help text formatted in HTML for resolving the problem 47 | * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) 48 | * @param Boolean $optional Whether this is only an optional recommendation not a mandatory requirement 49 | */ 50 | public function __construct($fulfilled, $testMessage, $helpHtml, $helpText = null, $optional = false) 51 | { 52 | $this->fulfilled = (Boolean) $fulfilled; 53 | $this->testMessage = (string) $testMessage; 54 | $this->helpHtml = (string) $helpHtml; 55 | $this->helpText = null === $helpText ? strip_tags($this->helpHtml) : (string) $helpText; 56 | $this->optional = (Boolean) $optional; 57 | } 58 | 59 | /** 60 | * Returns whether the requirement is fulfilled. 61 | * 62 | * @return Boolean true if fulfilled, otherwise false 63 | */ 64 | public function isFulfilled() 65 | { 66 | return $this->fulfilled; 67 | } 68 | 69 | /** 70 | * Returns the message for testing the requirement. 71 | * 72 | * @return string The test message 73 | */ 74 | public function getTestMessage() 75 | { 76 | return $this->testMessage; 77 | } 78 | 79 | /** 80 | * Returns the help text for resolving the problem 81 | * 82 | * @return string The help text 83 | */ 84 | public function getHelpText() 85 | { 86 | return $this->helpText; 87 | } 88 | 89 | /** 90 | * Returns the help text formatted in HTML. 91 | * 92 | * @return string The HTML help 93 | */ 94 | public function getHelpHtml() 95 | { 96 | return $this->helpHtml; 97 | } 98 | 99 | /** 100 | * Returns whether this is only an optional recommendation and not a mandatory requirement. 101 | * 102 | * @return Boolean true if optional, false if mandatory 103 | */ 104 | public function isOptional() 105 | { 106 | return $this->optional; 107 | } 108 | } 109 | 110 | /** 111 | * Represents a PHP requirement in form of a php.ini configuration. 112 | * 113 | * @author Tobias Schultze 114 | */ 115 | class PhpIniRequirement extends Requirement 116 | { 117 | /** 118 | * Constructor that initializes the requirement. 119 | * 120 | * @param string $cfgName The configuration name used for ini_get() 121 | * @param Boolean|callback $evaluation Either a Boolean indicating whether the configuration should evaluate to true or false, 122 | or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement 123 | * @param Boolean $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false. 124 | This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin. 125 | Example: You require a config to be true but PHP later removes this config and defaults it to true internally. 126 | * @param string|null $testMessage The message for testing the requirement (when null and $evaluation is a Boolean a default message is derived) 127 | * @param string|null $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a Boolean a default help is derived) 128 | * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) 129 | * @param Boolean $optional Whether this is only an optional recommendation not a mandatory requirement 130 | */ 131 | public function __construct($cfgName, $evaluation, $approveCfgAbsence = false, $testMessage = null, $helpHtml = null, $helpText = null, $optional = false) 132 | { 133 | $cfgValue = ini_get($cfgName); 134 | 135 | if (is_callable($evaluation)) { 136 | if (null === $testMessage || null === $helpHtml) { 137 | throw new InvalidArgumentException('You must provide the parameters testMessage and helpHtml for a callback evaluation.'); 138 | } 139 | 140 | $fulfilled = call_user_func($evaluation, $cfgValue); 141 | } else { 142 | if (null === $testMessage) { 143 | $testMessage = sprintf('%s %s be %s in php.ini', 144 | $cfgName, 145 | $optional ? 'should' : 'must', 146 | $evaluation ? 'enabled' : 'disabled' 147 | ); 148 | } 149 | 150 | if (null === $helpHtml) { 151 | $helpHtml = sprintf('Set %s to %s in php.ini*.', 152 | $cfgName, 153 | $evaluation ? 'on' : 'off' 154 | ); 155 | } 156 | 157 | $fulfilled = $evaluation == $cfgValue; 158 | } 159 | 160 | parent::__construct($fulfilled || ($approveCfgAbsence && false === $cfgValue), $testMessage, $helpHtml, $helpText, $optional); 161 | } 162 | } 163 | 164 | /** 165 | * A RequirementCollection represents a set of Requirement instances. 166 | * 167 | * @author Tobias Schultze 168 | */ 169 | class RequirementCollection implements IteratorAggregate 170 | { 171 | private $requirements = array(); 172 | 173 | /** 174 | * Gets the current RequirementCollection as an Iterator. 175 | * 176 | * @return Traversable A Traversable interface 177 | */ 178 | public function getIterator() 179 | { 180 | return new ArrayIterator($this->requirements); 181 | } 182 | 183 | /** 184 | * Adds a Requirement. 185 | * 186 | * @param Requirement $requirement A Requirement instance 187 | */ 188 | public function add(Requirement $requirement) 189 | { 190 | $this->requirements[] = $requirement; 191 | } 192 | 193 | /** 194 | * Adds a mandatory requirement. 195 | * 196 | * @param Boolean $fulfilled Whether the requirement is fulfilled 197 | * @param string $testMessage The message for testing the requirement 198 | * @param string $helpHtml The help text formatted in HTML for resolving the problem 199 | * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) 200 | */ 201 | public function addRequirement($fulfilled, $testMessage, $helpHtml, $helpText = null) 202 | { 203 | $this->add(new Requirement($fulfilled, $testMessage, $helpHtml, $helpText, false)); 204 | } 205 | 206 | /** 207 | * Adds an optional recommendation. 208 | * 209 | * @param Boolean $fulfilled Whether the recommendation is fulfilled 210 | * @param string $testMessage The message for testing the recommendation 211 | * @param string $helpHtml The help text formatted in HTML for resolving the problem 212 | * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) 213 | */ 214 | public function addRecommendation($fulfilled, $testMessage, $helpHtml, $helpText = null) 215 | { 216 | $this->add(new Requirement($fulfilled, $testMessage, $helpHtml, $helpText, true)); 217 | } 218 | 219 | /** 220 | * Adds a mandatory requirement in form of a php.ini configuration. 221 | * 222 | * @param string $cfgName The configuration name used for ini_get() 223 | * @param Boolean|callback $evaluation Either a Boolean indicating whether the configuration should evaluate to true or false, 224 | or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement 225 | * @param Boolean $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false. 226 | This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin. 227 | Example: You require a config to be true but PHP later removes this config and defaults it to true internally. 228 | * @param string $testMessage The message for testing the requirement (when null and $evaluation is a Boolean a default message is derived) 229 | * @param string $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a Boolean a default help is derived) 230 | * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) 231 | */ 232 | public function addPhpIniRequirement($cfgName, $evaluation, $approveCfgAbsence = false, $testMessage = null, $helpHtml = null, $helpText = null) 233 | { 234 | $this->add(new PhpIniRequirement($cfgName, $evaluation, $approveCfgAbsence, $testMessage, $helpHtml, $helpText, false)); 235 | } 236 | 237 | /** 238 | * Adds an optional recommendation in form of a php.ini configuration. 239 | * 240 | * @param string $cfgName The configuration name used for ini_get() 241 | * @param Boolean|callback $evaluation Either a Boolean indicating whether the configuration should evaluate to true or false, 242 | or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement 243 | * @param Boolean $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false. 244 | This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin. 245 | Example: You require a config to be true but PHP later removes this config and defaults it to true internally. 246 | * @param string $testMessage The message for testing the requirement (when null and $evaluation is a Boolean a default message is derived) 247 | * @param string $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a Boolean a default help is derived) 248 | * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) 249 | */ 250 | public function addPhpIniRecommendation($cfgName, $evaluation, $approveCfgAbsence = false, $testMessage = null, $helpHtml = null, $helpText = null) 251 | { 252 | $this->add(new PhpIniRequirement($cfgName, $evaluation, $approveCfgAbsence, $testMessage, $helpHtml, $helpText, true)); 253 | } 254 | 255 | /** 256 | * Adds a requirement collection to the current set of requirements. 257 | * 258 | * @param RequirementCollection $collection A RequirementCollection instance 259 | */ 260 | public function addCollection(RequirementCollection $collection) 261 | { 262 | $this->requirements = array_merge($this->requirements, $collection->all()); 263 | } 264 | 265 | /** 266 | * Returns both requirements and recommendations. 267 | * 268 | * @return array Array of Requirement instances 269 | */ 270 | public function all() 271 | { 272 | return $this->requirements; 273 | } 274 | 275 | /** 276 | * Returns all mandatory requirements. 277 | * 278 | * @return array Array of Requirement instances 279 | */ 280 | public function getRequirements() 281 | { 282 | $array = array(); 283 | foreach ($this->requirements as $req) { 284 | if (!$req->isOptional()) { 285 | $array[] = $req; 286 | } 287 | } 288 | 289 | return $array; 290 | } 291 | 292 | /** 293 | * Returns the mandatory requirements that were not met. 294 | * 295 | * @return array Array of Requirement instances 296 | */ 297 | public function getFailedRequirements() 298 | { 299 | $array = array(); 300 | foreach ($this->requirements as $req) { 301 | if (!$req->isFulfilled() && !$req->isOptional()) { 302 | $array[] = $req; 303 | } 304 | } 305 | 306 | return $array; 307 | } 308 | 309 | /** 310 | * Returns all optional recommmendations. 311 | * 312 | * @return array Array of Requirement instances 313 | */ 314 | public function getRecommendations() 315 | { 316 | $array = array(); 317 | foreach ($this->requirements as $req) { 318 | if ($req->isOptional()) { 319 | $array[] = $req; 320 | } 321 | } 322 | 323 | return $array; 324 | } 325 | 326 | /** 327 | * Returns the recommendations that were not met. 328 | * 329 | * @return array Array of Requirement instances 330 | */ 331 | public function getFailedRecommendations() 332 | { 333 | $array = array(); 334 | foreach ($this->requirements as $req) { 335 | if (!$req->isFulfilled() && $req->isOptional()) { 336 | $array[] = $req; 337 | } 338 | } 339 | 340 | return $array; 341 | } 342 | 343 | /** 344 | * Returns whether a php.ini configuration is not correct. 345 | * 346 | * @return Boolean php.ini configuration problem? 347 | */ 348 | public function hasPhpIniConfigIssue() 349 | { 350 | foreach ($this->requirements as $req) { 351 | if (!$req->isFulfilled() && $req instanceof PhpIniRequirement) { 352 | return true; 353 | } 354 | } 355 | 356 | return false; 357 | } 358 | 359 | /** 360 | * Returns the PHP configuration file (php.ini) path. 361 | * 362 | * @return string|false php.ini file path 363 | */ 364 | public function getPhpIniConfigPath() 365 | { 366 | return get_cfg_var('cfg_file_path'); 367 | } 368 | } 369 | 370 | /** 371 | * This class specifies all requirements and optional recommendations that 372 | * are necessary to run the Symfony Standard Edition. 373 | * 374 | * @author Tobias Schultze 375 | * @author Fabien Potencier 376 | */ 377 | class SymfonyRequirements extends RequirementCollection 378 | { 379 | const REQUIRED_PHP_VERSION = '5.3.3'; 380 | 381 | /** 382 | * Constructor that initializes the requirements. 383 | */ 384 | public function __construct() 385 | { 386 | /* mandatory requirements follow */ 387 | 388 | $installedPhpVersion = phpversion(); 389 | 390 | $this->addRequirement( 391 | version_compare($installedPhpVersion, self::REQUIRED_PHP_VERSION, '>='), 392 | sprintf('PHP version must be at least %s (%s installed)', self::REQUIRED_PHP_VERSION, $installedPhpVersion), 393 | sprintf('You are running PHP version "%s", but Symfony needs at least PHP "%s" to run. 394 | Before using Symfony, upgrade your PHP installation, preferably to the latest version.', 395 | $installedPhpVersion, self::REQUIRED_PHP_VERSION), 396 | sprintf('Install PHP %s or newer (installed version is %s)', self::REQUIRED_PHP_VERSION, $installedPhpVersion) 397 | ); 398 | 399 | $this->addRequirement( 400 | version_compare($installedPhpVersion, '5.3.16', '!='), 401 | 'PHP version must not be 5.3.16 as Symfony won\'t work properly with it', 402 | 'Install PHP 5.3.17 or newer (or downgrade to an earlier PHP version)' 403 | ); 404 | 405 | $this->addRequirement( 406 | is_dir(__DIR__.'/../vendor/composer'), 407 | 'Vendor libraries must be installed', 408 | 'Vendor libraries are missing. Install composer following instructions from http://getcomposer.org/. ' . 409 | 'Then run "php composer.phar install" to install them.' 410 | ); 411 | 412 | $baseDir = basename(__DIR__); 413 | 414 | $this->addRequirement( 415 | is_writable(__DIR__.'/cache'), 416 | "$baseDir/cache/ directory must be writable", 417 | "Change the permissions of the \"$baseDir/cache/\" directory so that the web server can write into it." 418 | ); 419 | 420 | $this->addRequirement( 421 | is_writable(__DIR__.'/logs'), 422 | "$baseDir/logs/ directory must be writable", 423 | "Change the permissions of the \"$baseDir/logs/\" directory so that the web server can write into it." 424 | ); 425 | 426 | $this->addPhpIniRequirement( 427 | 'date.timezone', true, false, 428 | 'date.timezone setting must be set', 429 | 'Set the "date.timezone" setting in php.ini* (like Europe/Paris).' 430 | ); 431 | 432 | if (version_compare($installedPhpVersion, self::REQUIRED_PHP_VERSION, '>=')) { 433 | $timezones = array(); 434 | foreach (DateTimeZone::listAbbreviations() as $abbreviations) { 435 | foreach ($abbreviations as $abbreviation) { 436 | $timezones[$abbreviation['timezone_id']] = true; 437 | } 438 | } 439 | 440 | $this->addRequirement( 441 | isset($timezones[date_default_timezone_get()]), 442 | sprintf('Configured default timezone "%s" must be supported by your installation of PHP', date_default_timezone_get()), 443 | 'Your default timezone is not supported by PHP. Check for typos in your php.ini file and have a look at the list of deprecated timezones at http://php.net/manual/en/timezones.others.php.' 444 | ); 445 | } 446 | 447 | $this->addRequirement( 448 | function_exists('json_encode'), 449 | 'json_encode() must be available', 450 | 'Install and enable the JSON extension.' 451 | ); 452 | 453 | $this->addRequirement( 454 | function_exists('session_start'), 455 | 'session_start() must be available', 456 | 'Install and enable the session extension.' 457 | ); 458 | 459 | $this->addRequirement( 460 | function_exists('ctype_alpha'), 461 | 'ctype_alpha() must be available', 462 | 'Install and enable the ctype extension.' 463 | ); 464 | 465 | $this->addRequirement( 466 | function_exists('token_get_all'), 467 | 'token_get_all() must be available', 468 | 'Install and enable the Tokenizer extension.' 469 | ); 470 | 471 | $this->addRequirement( 472 | function_exists('simplexml_import_dom'), 473 | 'simplexml_import_dom() must be available', 474 | 'Install and enable the SimpleXML extension.' 475 | ); 476 | 477 | if (function_exists('apc_store') && ini_get('apc.enabled')) { 478 | if (version_compare($installedPhpVersion, '5.4.0', '>=')) { 479 | $this->addRequirement( 480 | version_compare(phpversion('apc'), '3.1.13', '>='), 481 | 'APC version must be at least 3.1.13 when using PHP 5.4', 482 | 'Upgrade your APC extension (3.1.13+).' 483 | ); 484 | } else { 485 | $this->addRequirement( 486 | version_compare(phpversion('apc'), '3.0.17', '>='), 487 | 'APC version must be at least 3.0.17', 488 | 'Upgrade your APC extension (3.0.17+).' 489 | ); 490 | } 491 | } 492 | 493 | $this->addPhpIniRequirement('detect_unicode', false); 494 | 495 | if (extension_loaded('suhosin')) { 496 | $this->addPhpIniRequirement( 497 | 'suhosin.executor.include.whitelist', 498 | create_function('$cfgValue', 'return false !== stripos($cfgValue, "phar");'), 499 | false, 500 | 'suhosin.executor.include.whitelist must be configured correctly in php.ini', 501 | 'Add "phar" to suhosin.executor.include.whitelist in php.ini*.' 502 | ); 503 | } 504 | 505 | if (extension_loaded('xdebug')) { 506 | $this->addPhpIniRequirement( 507 | 'xdebug.show_exception_trace', false, true 508 | ); 509 | 510 | $this->addPhpIniRequirement( 511 | 'xdebug.scream', false, true 512 | ); 513 | 514 | $this->addPhpIniRecommendation( 515 | 'xdebug.max_nesting_level', 516 | create_function('$cfgValue', 'return $cfgValue > 100;'), 517 | true, 518 | 'xdebug.max_nesting_level should be above 100 in php.ini', 519 | 'Set "xdebug.max_nesting_level" to e.g. "250" in php.ini* to stop Xdebug\'s infinite recursion protection erroneously throwing a fatal error in your project.' 520 | ); 521 | } 522 | 523 | $pcreVersion = defined('PCRE_VERSION') ? (float) PCRE_VERSION : null; 524 | 525 | $this->addRequirement( 526 | null !== $pcreVersion, 527 | 'PCRE extension must be available', 528 | 'Install the PCRE extension (version 8.0+).' 529 | ); 530 | 531 | /* optional recommendations follow */ 532 | 533 | $this->addRecommendation( 534 | file_get_contents(__FILE__) === file_get_contents(__DIR__.'/../vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/skeleton/app/SymfonyRequirements.php'), 535 | 'Requirements file should be up-to-date', 536 | 'Your requirements file is outdated. Run composer install and re-check your configuration.' 537 | ); 538 | 539 | $this->addRecommendation( 540 | version_compare($installedPhpVersion, '5.3.4', '>='), 541 | 'You should use at least PHP 5.3.4 due to PHP bug #52083 in earlier versions', 542 | 'Your project might malfunction randomly due to PHP bug #52083 ("Notice: Trying to get property of non-object"). Install PHP 5.3.4 or newer.' 543 | ); 544 | 545 | $this->addRecommendation( 546 | version_compare($installedPhpVersion, '5.3.8', '>='), 547 | 'When using annotations you should have at least PHP 5.3.8 due to PHP bug #55156', 548 | 'Install PHP 5.3.8 or newer if your project uses annotations.' 549 | ); 550 | 551 | $this->addRecommendation( 552 | version_compare($installedPhpVersion, '5.4.0', '!='), 553 | 'You should not use PHP 5.4.0 due to the PHP bug #61453', 554 | 'Your project might not work properly due to the PHP bug #61453 ("Cannot dump definitions which have method calls"). Install PHP 5.4.1 or newer.' 555 | ); 556 | 557 | if (null !== $pcreVersion) { 558 | $this->addRecommendation( 559 | $pcreVersion >= 8.0, 560 | sprintf('PCRE extension should be at least version 8.0 (%s installed)', $pcreVersion), 561 | 'PCRE 8.0+ is preconfigured in PHP since 5.3.2 but you are using an outdated version of it. Symfony probably works anyway but it is recommended to upgrade your PCRE extension.' 562 | ); 563 | } 564 | 565 | $this->addRecommendation( 566 | class_exists('DomDocument'), 567 | 'PHP-XML module should be installed', 568 | 'Install and enable the PHP-XML module.' 569 | ); 570 | 571 | $this->addRecommendation( 572 | function_exists('mb_strlen'), 573 | 'mb_strlen() should be available', 574 | 'Install and enable the mbstring extension.' 575 | ); 576 | 577 | $this->addRecommendation( 578 | function_exists('iconv'), 579 | 'iconv() should be available', 580 | 'Install and enable the iconv extension.' 581 | ); 582 | 583 | $this->addRecommendation( 584 | function_exists('utf8_decode'), 585 | 'utf8_decode() should be available', 586 | 'Install and enable the XML extension.' 587 | ); 588 | 589 | if (!defined('PHP_WINDOWS_VERSION_BUILD')) { 590 | $this->addRecommendation( 591 | function_exists('posix_isatty'), 592 | 'posix_isatty() should be available', 593 | 'Install and enable the php_posix extension (used to colorize the CLI output).' 594 | ); 595 | } 596 | 597 | $this->addRecommendation( 598 | class_exists('Locale'), 599 | 'intl extension should be available', 600 | 'Install and enable the intl extension (used for validators).' 601 | ); 602 | 603 | if (class_exists('Collator')) { 604 | $this->addRecommendation( 605 | null !== new Collator('fr_FR'), 606 | 'intl extension should be correctly configured', 607 | 'The intl extension does not behave properly. This problem is typical on PHP 5.3.X x64 WIN builds.' 608 | ); 609 | } 610 | 611 | if (class_exists('Locale')) { 612 | if (defined('INTL_ICU_VERSION')) { 613 | $version = INTL_ICU_VERSION; 614 | } else { 615 | $reflector = new ReflectionExtension('intl'); 616 | 617 | ob_start(); 618 | $reflector->info(); 619 | $output = strip_tags(ob_get_clean()); 620 | 621 | preg_match('/^ICU version +(?:=> )?(.*)$/m', $output, $matches); 622 | $version = $matches[1]; 623 | } 624 | 625 | $this->addRecommendation( 626 | version_compare($version, '4.0', '>='), 627 | 'intl ICU version should be at least 4+', 628 | 'Upgrade your intl extension with a newer ICU version (4+).' 629 | ); 630 | } 631 | 632 | $accelerator = 633 | (function_exists('apc_store') && ini_get('apc.enabled')) 634 | || 635 | function_exists('eaccelerator_put') && ini_get('eaccelerator.enable') 636 | || 637 | function_exists('xcache_set') 638 | ; 639 | 640 | $this->addRecommendation( 641 | $accelerator, 642 | 'a PHP accelerator should be installed', 643 | 'Install and enable a PHP accelerator like APC (highly recommended).' 644 | ); 645 | 646 | $this->addPhpIniRecommendation('short_open_tag', false); 647 | 648 | $this->addPhpIniRecommendation('magic_quotes_gpc', false, true); 649 | 650 | $this->addPhpIniRecommendation('register_globals', false, true); 651 | 652 | $this->addPhpIniRecommendation('session.auto_start', false); 653 | 654 | $this->addRecommendation( 655 | class_exists('PDO'), 656 | 'PDO should be installed', 657 | 'Install PDO (mandatory for Doctrine).' 658 | ); 659 | 660 | if (class_exists('PDO')) { 661 | $drivers = PDO::getAvailableDrivers(); 662 | $this->addRecommendation( 663 | count($drivers), 664 | sprintf('PDO should have some drivers installed (currently available: %s)', count($drivers) ? implode(', ', $drivers) : 'none'), 665 | 'Install PDO drivers (mandatory for Doctrine).' 666 | ); 667 | } 668 | } 669 | } 670 | -------------------------------------------------------------------------------- /app/autoload.php: -------------------------------------------------------------------------------- 1 | add('', __DIR__.'/../vendor/symfony/symfony/src/Symfony/Component/Locale/Resources/stubs'); 12 | } 13 | 14 | AnnotationRegistry::registerLoader(array($loader, 'loadClass')); 15 | 16 | return $loader; 17 | -------------------------------------------------------------------------------- /app/bootstrap.php.cache: -------------------------------------------------------------------------------- 1 | parameterBag = null === $parameterBag ? new ParameterBag() : $parameterBag; 66 | $this->services = array(); 67 | $this->scopes = array(); 68 | $this->scopeChildren = array(); 69 | $this->scopedServices = array(); 70 | $this->scopeStacks = array(); 71 | $this->set('service_container', $this); 72 | } 73 | public function compile() 74 | { 75 | $this->parameterBag->resolve(); 76 | $this->parameterBag = new FrozenParameterBag($this->parameterBag->all()); 77 | } 78 | public function isFrozen() 79 | { 80 | return $this->parameterBag instanceof FrozenParameterBag; 81 | } 82 | public function getParameterBag() 83 | { 84 | return $this->parameterBag; 85 | } 86 | public function getParameter($name) 87 | { 88 | return $this->parameterBag->get($name); 89 | } 90 | public function hasParameter($name) 91 | { 92 | return $this->parameterBag->has($name); 93 | } 94 | public function setParameter($name, $value) 95 | { 96 | $this->parameterBag->set($name, $value); 97 | } 98 | public function set($id, $service, $scope = self::SCOPE_CONTAINER) 99 | { 100 | if (self::SCOPE_PROTOTYPE === $scope) { 101 | throw new InvalidArgumentException(sprintf('You cannot set service "%s" of scope "prototype".', $id)); 102 | } 103 | $id = strtolower($id); 104 | if (self::SCOPE_CONTAINER !== $scope) { 105 | if (!isset($this->scopedServices[$scope])) { 106 | throw new RuntimeException(sprintf('You cannot set service "%s" of inactive scope.', $id)); 107 | } 108 | $this->scopedServices[$scope][$id] = $service; 109 | } 110 | $this->services[$id] = $service; 111 | } 112 | public function has($id) 113 | { 114 | $id = strtolower($id); 115 | return isset($this->services[$id]) || method_exists($this,'get'.strtr($id, array('_'=>'','.'=>'_')).'Service'); 116 | } 117 | public function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE) 118 | { 119 | $id = strtolower($id); 120 | if (isset($this->services[$id])) { 121 | return $this->services[$id]; 122 | } 123 | if (isset($this->loading[$id])) { 124 | throw new ServiceCircularReferenceException($id, array_keys($this->loading)); 125 | } 126 | if (method_exists($this, $method ='get'.strtr($id, array('_'=>'','.'=>'_')).'Service')) { 127 | $this->loading[$id] = true; 128 | try { 129 | $service = $this->$method(); 130 | } catch (\Exception $e) { 131 | unset($this->loading[$id]); 132 | if (isset($this->services[$id])) { 133 | unset($this->services[$id]); 134 | } 135 | throw $e; 136 | } 137 | unset($this->loading[$id]); 138 | return $service; 139 | } 140 | if (self::EXCEPTION_ON_INVALID_REFERENCE === $invalidBehavior) { 141 | throw new ServiceNotFoundException($id); 142 | } 143 | } 144 | public function initialized($id) 145 | { 146 | return isset($this->services[strtolower($id)]); 147 | } 148 | public function getServiceIds() 149 | { 150 | $ids = array(); 151 | $r = new \ReflectionClass($this); 152 | foreach ($r->getMethods() as $method) { 153 | if (preg_match('/^get(.+)Service$/', $method->name, $match)) { 154 | $ids[] = self::underscore($match[1]); 155 | } 156 | } 157 | return array_unique(array_merge($ids, array_keys($this->services))); 158 | } 159 | public function enterScope($name) 160 | { 161 | if (!isset($this->scopes[$name])) { 162 | throw new InvalidArgumentException(sprintf('The scope "%s" does not exist.', $name)); 163 | } 164 | if (self::SCOPE_CONTAINER !== $this->scopes[$name] && !isset($this->scopedServices[$this->scopes[$name]])) { 165 | throw new RuntimeException(sprintf('The parent scope "%s" must be active when entering this scope.', $this->scopes[$name])); 166 | } 167 | if (isset($this->scopedServices[$name])) { 168 | $services = array($this->services, $name => $this->scopedServices[$name]); 169 | unset($this->scopedServices[$name]); 170 | foreach ($this->scopeChildren[$name] as $child) { 171 | if (isset($this->scopedServices[$child])) { 172 | $services[$child] = $this->scopedServices[$child]; 173 | unset($this->scopedServices[$child]); 174 | } 175 | } 176 | $this->services = call_user_func_array('array_diff_key', $services); 177 | array_shift($services); 178 | if (!isset($this->scopeStacks[$name])) { 179 | $this->scopeStacks[$name] = new \SplStack(); 180 | } 181 | $this->scopeStacks[$name]->push($services); 182 | } 183 | $this->scopedServices[$name] = array(); 184 | } 185 | public function leaveScope($name) 186 | { 187 | if (!isset($this->scopedServices[$name])) { 188 | throw new InvalidArgumentException(sprintf('The scope "%s" is not active.', $name)); 189 | } 190 | $services = array($this->services, $this->scopedServices[$name]); 191 | unset($this->scopedServices[$name]); 192 | foreach ($this->scopeChildren[$name] as $child) { 193 | if (!isset($this->scopedServices[$child])) { 194 | continue; 195 | } 196 | $services[] = $this->scopedServices[$child]; 197 | unset($this->scopedServices[$child]); 198 | } 199 | $this->services = call_user_func_array('array_diff_key', $services); 200 | if (isset($this->scopeStacks[$name]) && count($this->scopeStacks[$name]) > 0) { 201 | $services = $this->scopeStacks[$name]->pop(); 202 | $this->scopedServices += $services; 203 | array_unshift($services, $this->services); 204 | $this->services = call_user_func_array('array_merge', $services); 205 | } 206 | } 207 | public function addScope(ScopeInterface $scope) 208 | { 209 | $name = $scope->getName(); 210 | $parentScope = $scope->getParentName(); 211 | if (self::SCOPE_CONTAINER === $name || self::SCOPE_PROTOTYPE === $name) { 212 | throw new InvalidArgumentException(sprintf('The scope "%s" is reserved.', $name)); 213 | } 214 | if (isset($this->scopes[$name])) { 215 | throw new InvalidArgumentException(sprintf('A scope with name "%s" already exists.', $name)); 216 | } 217 | if (self::SCOPE_CONTAINER !== $parentScope && !isset($this->scopes[$parentScope])) { 218 | throw new InvalidArgumentException(sprintf('The parent scope "%s" does not exist, or is invalid.', $parentScope)); 219 | } 220 | $this->scopes[$name] = $parentScope; 221 | $this->scopeChildren[$name] = array(); 222 | while ($parentScope !== self::SCOPE_CONTAINER) { 223 | $this->scopeChildren[$parentScope][] = $name; 224 | $parentScope = $this->scopes[$parentScope]; 225 | } 226 | } 227 | public function hasScope($name) 228 | { 229 | return isset($this->scopes[$name]); 230 | } 231 | public function isScopeActive($name) 232 | { 233 | return isset($this->scopedServices[$name]); 234 | } 235 | public static function camelize($id) 236 | { 237 | return preg_replace_callback('/(^|_|\.)+(.)/', function ($match) { return ('.'=== $match[1] ?'_':'').strtoupper($match[2]); }, $id); 238 | } 239 | public static function underscore($id) 240 | { 241 | return strtolower(preg_replace(array('/([A-Z]+)([A-Z][a-z])/','/([a-z\d])([A-Z])/'), array('\\1_\\2','\\1_\\2'), strtr($id,'_','.'))); 242 | } 243 | } 244 | } 245 | namespace Symfony\Component\HttpKernel 246 | { 247 | use Symfony\Component\HttpFoundation\Request; 248 | use Symfony\Component\HttpFoundation\Response; 249 | interface HttpKernelInterface 250 | { 251 | const MASTER_REQUEST = 1; 252 | const SUB_REQUEST = 2; 253 | public function handle(Request $request, $type = self::MASTER_REQUEST, $catch = true); 254 | } 255 | } 256 | namespace Symfony\Component\HttpKernel 257 | { 258 | use Symfony\Component\DependencyInjection\ContainerInterface; 259 | use Symfony\Component\HttpKernel\HttpKernelInterface; 260 | use Symfony\Component\HttpKernel\Bundle\BundleInterface; 261 | use Symfony\Component\Config\Loader\LoaderInterface; 262 | interface KernelInterface extends HttpKernelInterface, \Serializable 263 | { 264 | public function registerBundles(); 265 | public function registerContainerConfiguration(LoaderInterface $loader); 266 | public function boot(); 267 | public function shutdown(); 268 | public function getBundles(); 269 | public function isClassInActiveBundle($class); 270 | public function getBundle($name, $first = true); 271 | public function locateResource($name, $dir = null, $first = true); 272 | public function getName(); 273 | public function getEnvironment(); 274 | public function isDebug(); 275 | public function getRootDir(); 276 | public function getContainer(); 277 | public function getStartTime(); 278 | public function getCacheDir(); 279 | public function getLogDir(); 280 | public function getCharset(); 281 | } 282 | } 283 | namespace Symfony\Component\HttpKernel 284 | { 285 | use Symfony\Component\HttpFoundation\Request; 286 | use Symfony\Component\HttpFoundation\Response; 287 | interface TerminableInterface 288 | { 289 | public function terminate(Request $request, Response $response); 290 | } 291 | } 292 | namespace Symfony\Component\HttpKernel 293 | { 294 | use Symfony\Component\DependencyInjection\ContainerInterface; 295 | use Symfony\Component\DependencyInjection\ContainerBuilder; 296 | use Symfony\Component\DependencyInjection\Dumper\PhpDumper; 297 | use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; 298 | use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; 299 | use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; 300 | use Symfony\Component\DependencyInjection\Loader\IniFileLoader; 301 | use Symfony\Component\DependencyInjection\Loader\PhpFileLoader; 302 | use Symfony\Component\DependencyInjection\Loader\ClosureLoader; 303 | use Symfony\Component\HttpFoundation\Request; 304 | use Symfony\Component\HttpFoundation\Response; 305 | use Symfony\Component\HttpKernel\HttpKernelInterface; 306 | use Symfony\Component\HttpKernel\Bundle\BundleInterface; 307 | use Symfony\Component\HttpKernel\Config\FileLocator; 308 | use Symfony\Component\HttpKernel\DependencyInjection\MergeExtensionConfigurationPass; 309 | use Symfony\Component\HttpKernel\DependencyInjection\AddClassesToCachePass; 310 | use Symfony\Component\HttpKernel\Debug\ErrorHandler; 311 | use Symfony\Component\HttpKernel\Debug\ExceptionHandler; 312 | use Symfony\Component\Config\Loader\LoaderResolver; 313 | use Symfony\Component\Config\Loader\DelegatingLoader; 314 | use Symfony\Component\Config\ConfigCache; 315 | use Symfony\Component\ClassLoader\ClassCollectionLoader; 316 | use Symfony\Component\ClassLoader\DebugClassLoader; 317 | abstract class Kernel implements KernelInterface, TerminableInterface 318 | { 319 | protected $bundles; 320 | protected $bundleMap; 321 | protected $container; 322 | protected $rootDir; 323 | protected $environment; 324 | protected $debug; 325 | protected $booted; 326 | protected $name; 327 | protected $startTime; 328 | protected $classes; 329 | protected $errorReportingLevel; 330 | const VERSION ='2.2.1'; 331 | const VERSION_ID ='20101'; 332 | const MAJOR_VERSION ='2'; 333 | const MINOR_VERSION ='2'; 334 | const RELEASE_VERSION ='1'; 335 | const EXTRA_VERSION =''; 336 | public function __construct($environment, $debug) 337 | { 338 | $this->environment = $environment; 339 | $this->debug = (Boolean) $debug; 340 | $this->booted = false; 341 | $this->rootDir = $this->getRootDir(); 342 | $this->name = $this->getName(); 343 | $this->classes = array(); 344 | $this->bundles = array(); 345 | if ($this->debug) { 346 | $this->startTime = microtime(true); 347 | } 348 | $this->init(); 349 | } 350 | public function init() 351 | { 352 | ini_set('display_errors', 0); 353 | if ($this->debug) { 354 | error_reporting(-1); 355 | DebugClassLoader::enable(); 356 | ErrorHandler::register($this->errorReportingLevel); 357 | if ('cli'!== php_sapi_name()) { 358 | ExceptionHandler::register(); 359 | } else { 360 | ini_set('display_errors', 1); 361 | } 362 | } 363 | } 364 | public function __clone() 365 | { 366 | if ($this->debug) { 367 | $this->startTime = microtime(true); 368 | } 369 | $this->booted = false; 370 | $this->container = null; 371 | } 372 | public function boot() 373 | { 374 | if (true === $this->booted) { 375 | return; 376 | } 377 | $this->initializeBundles(); 378 | $this->initializeContainer(); 379 | foreach ($this->getBundles() as $bundle) { 380 | $bundle->setContainer($this->container); 381 | $bundle->boot(); 382 | } 383 | $this->booted = true; 384 | } 385 | public function terminate(Request $request, Response $response) 386 | { 387 | if (false === $this->booted) { 388 | return; 389 | } 390 | if ($this->getHttpKernel() instanceof TerminableInterface) { 391 | $this->getHttpKernel()->terminate($request, $response); 392 | } 393 | } 394 | public function shutdown() 395 | { 396 | if (false === $this->booted) { 397 | return; 398 | } 399 | $this->booted = false; 400 | foreach ($this->getBundles() as $bundle) { 401 | $bundle->shutdown(); 402 | $bundle->setContainer(null); 403 | } 404 | $this->container = null; 405 | } 406 | public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true) 407 | { 408 | if (false === $this->booted) { 409 | $this->boot(); 410 | } 411 | return $this->getHttpKernel()->handle($request, $type, $catch); 412 | } 413 | protected function getHttpKernel() 414 | { 415 | return $this->container->get('http_kernel'); 416 | } 417 | public function getBundles() 418 | { 419 | return $this->bundles; 420 | } 421 | public function isClassInActiveBundle($class) 422 | { 423 | foreach ($this->getBundles() as $bundle) { 424 | if (0 === strpos($class, $bundle->getNamespace())) { 425 | return true; 426 | } 427 | } 428 | return false; 429 | } 430 | public function getBundle($name, $first = true) 431 | { 432 | if (!isset($this->bundleMap[$name])) { 433 | throw new \InvalidArgumentException(sprintf('Bundle "%s" does not exist or it is not enabled. Maybe you forgot to add it in the registerBundles() method of your %s.php file?', $name, get_class($this))); 434 | } 435 | if (true === $first) { 436 | return $this->bundleMap[$name][0]; 437 | } 438 | return $this->bundleMap[$name]; 439 | } 440 | public function locateResource($name, $dir = null, $first = true) 441 | { 442 | if ('@'!== $name[0]) { 443 | throw new \InvalidArgumentException(sprintf('A resource name must start with @ ("%s" given).', $name)); 444 | } 445 | if (false !== strpos($name,'..')) { 446 | throw new \RuntimeException(sprintf('File name "%s" contains invalid characters (..).', $name)); 447 | } 448 | $bundleName = substr($name, 1); 449 | $path =''; 450 | if (false !== strpos($bundleName,'/')) { 451 | list($bundleName, $path) = explode('/', $bundleName, 2); 452 | } 453 | $isResource = 0 === strpos($path,'Resources') && null !== $dir; 454 | $overridePath = substr($path, 9); 455 | $resourceBundle = null; 456 | $bundles = $this->getBundle($bundleName, false); 457 | $files = array(); 458 | foreach ($bundles as $bundle) { 459 | if ($isResource && file_exists($file = $dir.'/'.$bundle->getName().$overridePath)) { 460 | if (null !== $resourceBundle) { 461 | throw new \RuntimeException(sprintf('"%s" resource is hidden by a resource from the "%s" derived bundle. Create a "%s" file to override the bundle resource.', 462 | $file, 463 | $resourceBundle, 464 | $dir.'/'.$bundles[0]->getName().$overridePath 465 | )); 466 | } 467 | if ($first) { 468 | return $file; 469 | } 470 | $files[] = $file; 471 | } 472 | if (file_exists($file = $bundle->getPath().'/'.$path)) { 473 | if ($first && !$isResource) { 474 | return $file; 475 | } 476 | $files[] = $file; 477 | $resourceBundle = $bundle->getName(); 478 | } 479 | } 480 | if (count($files) > 0) { 481 | return $first && $isResource ? $files[0] : $files; 482 | } 483 | throw new \InvalidArgumentException(sprintf('Unable to find file "%s".', $name)); 484 | } 485 | public function getName() 486 | { 487 | if (null === $this->name) { 488 | $this->name = preg_replace('/[^a-zA-Z0-9_]+/','', basename($this->rootDir)); 489 | } 490 | return $this->name; 491 | } 492 | public function getEnvironment() 493 | { 494 | return $this->environment; 495 | } 496 | public function isDebug() 497 | { 498 | return $this->debug; 499 | } 500 | public function getRootDir() 501 | { 502 | if (null === $this->rootDir) { 503 | $r = new \ReflectionObject($this); 504 | $this->rootDir = str_replace('\\','/', dirname($r->getFileName())); 505 | } 506 | return $this->rootDir; 507 | } 508 | public function getContainer() 509 | { 510 | return $this->container; 511 | } 512 | public function loadClassCache($name ='classes', $extension ='.php') 513 | { 514 | if (!$this->booted && is_file($this->getCacheDir().'/classes.map')) { 515 | ClassCollectionLoader::load(include($this->getCacheDir().'/classes.map'), $this->getCacheDir(), $name, $this->debug, false, $extension); 516 | } 517 | } 518 | public function setClassCache(array $classes) 519 | { 520 | file_put_contents($this->getCacheDir().'/classes.map', sprintf('debug ? $this->startTime : -INF; 525 | } 526 | public function getCacheDir() 527 | { 528 | return $this->rootDir.'/cache/'.$this->environment; 529 | } 530 | public function getLogDir() 531 | { 532 | return $this->rootDir.'/logs'; 533 | } 534 | public function getCharset() 535 | { 536 | return'UTF-8'; 537 | } 538 | protected function initializeBundles() 539 | { 540 | $this->bundles = array(); 541 | $topMostBundles = array(); 542 | $directChildren = array(); 543 | foreach ($this->registerBundles() as $bundle) { 544 | $name = $bundle->getName(); 545 | if (isset($this->bundles[$name])) { 546 | throw new \LogicException(sprintf('Trying to register two bundles with the same name "%s"', $name)); 547 | } 548 | $this->bundles[$name] = $bundle; 549 | if ($parentName = $bundle->getParent()) { 550 | if (isset($directChildren[$parentName])) { 551 | throw new \LogicException(sprintf('Bundle "%s" is directly extended by two bundles "%s" and "%s".', $parentName, $name, $directChildren[$parentName])); 552 | } 553 | if ($parentName == $name) { 554 | throw new \LogicException(sprintf('Bundle "%s" can not extend itself.', $name)); 555 | } 556 | $directChildren[$parentName] = $name; 557 | } else { 558 | $topMostBundles[$name] = $bundle; 559 | } 560 | } 561 | if (count($diff = array_values(array_diff(array_keys($directChildren), array_keys($this->bundles))))) { 562 | throw new \LogicException(sprintf('Bundle "%s" extends bundle "%s", which is not registered.', $directChildren[$diff[0]], $diff[0])); 563 | } 564 | $this->bundleMap = array(); 565 | foreach ($topMostBundles as $name => $bundle) { 566 | $bundleMap = array($bundle); 567 | $hierarchy = array($name); 568 | while (isset($directChildren[$name])) { 569 | $name = $directChildren[$name]; 570 | array_unshift($bundleMap, $this->bundles[$name]); 571 | $hierarchy[] = $name; 572 | } 573 | foreach ($hierarchy as $bundle) { 574 | $this->bundleMap[$bundle] = $bundleMap; 575 | array_pop($bundleMap); 576 | } 577 | } 578 | } 579 | protected function getContainerClass() 580 | { 581 | return $this->name.ucfirst($this->environment).($this->debug ?'Debug':'').'ProjectContainer'; 582 | } 583 | protected function getContainerBaseClass() 584 | { 585 | return'Container'; 586 | } 587 | protected function initializeContainer() 588 | { 589 | $class = $this->getContainerClass(); 590 | $cache = new ConfigCache($this->getCacheDir().'/'.$class.'.php', $this->debug); 591 | $fresh = true; 592 | if (!$cache->isFresh()) { 593 | $container = $this->buildContainer(); 594 | $this->dumpContainer($cache, $container, $class, $this->getContainerBaseClass()); 595 | $fresh = false; 596 | } 597 | require_once $cache; 598 | $this->container = new $class(); 599 | $this->container->set('kernel', $this); 600 | if (!$fresh && $this->container->has('cache_warmer')) { 601 | $this->container->get('cache_warmer')->warmUp($this->container->getParameter('kernel.cache_dir')); 602 | } 603 | } 604 | protected function getKernelParameters() 605 | { 606 | $bundles = array(); 607 | foreach ($this->bundles as $name => $bundle) { 608 | $bundles[$name] = get_class($bundle); 609 | } 610 | return array_merge( 611 | array('kernel.root_dir'=> $this->rootDir,'kernel.environment'=> $this->environment,'kernel.debug'=> $this->debug,'kernel.name'=> $this->name,'kernel.cache_dir'=> $this->getCacheDir(),'kernel.logs_dir'=> $this->getLogDir(),'kernel.bundles'=> $bundles,'kernel.charset'=> $this->getCharset(),'kernel.container_class'=> $this->getContainerClass(), 612 | ), 613 | $this->getEnvParameters() 614 | ); 615 | } 616 | protected function getEnvParameters() 617 | { 618 | $parameters = array(); 619 | foreach ($_SERVER as $key => $value) { 620 | if (0 === strpos($key,'SYMFONY__')) { 621 | $parameters[strtolower(str_replace('__','.', substr($key, 9)))] = $value; 622 | } 623 | } 624 | return $parameters; 625 | } 626 | protected function buildContainer() 627 | { 628 | foreach (array('cache'=> $this->getCacheDir(),'logs'=> $this->getLogDir()) as $name => $dir) { 629 | if (!is_dir($dir)) { 630 | if (false === @mkdir($dir, 0777, true)) { 631 | throw new \RuntimeException(sprintf("Unable to create the %s directory (%s)\n", $name, $dir)); 632 | } 633 | } elseif (!is_writable($dir)) { 634 | throw new \RuntimeException(sprintf("Unable to write in the %s directory (%s)\n", $name, $dir)); 635 | } 636 | } 637 | $container = $this->getContainerBuilder(); 638 | $extensions = array(); 639 | foreach ($this->bundles as $bundle) { 640 | if ($extension = $bundle->getContainerExtension()) { 641 | $container->registerExtension($extension); 642 | $extensions[] = $extension->getAlias(); 643 | } 644 | if ($this->debug) { 645 | $container->addObjectResource($bundle); 646 | } 647 | } 648 | foreach ($this->bundles as $bundle) { 649 | $bundle->build($container); 650 | } 651 | $container->addObjectResource($this); 652 | $container->getCompilerPassConfig()->setMergePass(new MergeExtensionConfigurationPass($extensions)); 653 | if (null !== $cont = $this->registerContainerConfiguration($this->getContainerLoader($container))) { 654 | $container->merge($cont); 655 | } 656 | $container->addCompilerPass(new AddClassesToCachePass($this)); 657 | $container->compile(); 658 | return $container; 659 | } 660 | protected function getContainerBuilder() 661 | { 662 | return new ContainerBuilder(new ParameterBag($this->getKernelParameters())); 663 | } 664 | protected function dumpContainer(ConfigCache $cache, ContainerBuilder $container, $class, $baseClass) 665 | { 666 | $dumper = new PhpDumper($container); 667 | $content = $dumper->dump(array('class'=> $class,'base_class'=> $baseClass)); 668 | if (!$this->debug) { 669 | $content = self::stripComments($content); 670 | } 671 | $cache->write($content, $container->getResources()); 672 | } 673 | protected function getContainerLoader(ContainerInterface $container) 674 | { 675 | $locator = new FileLocator($this); 676 | $resolver = new LoaderResolver(array( 677 | new XmlFileLoader($container, $locator), 678 | new YamlFileLoader($container, $locator), 679 | new IniFileLoader($container, $locator), 680 | new PhpFileLoader($container, $locator), 681 | new ClosureLoader($container), 682 | )); 683 | return new DelegatingLoader($resolver); 684 | } 685 | public static function stripComments($source) 686 | { 687 | if (!function_exists('token_get_all')) { 688 | return $source; 689 | } 690 | $rawChunk =''; 691 | $output =''; 692 | $tokens = token_get_all($source); 693 | for (reset($tokens); false !== $token = current($tokens); next($tokens)) { 694 | if (is_string($token)) { 695 | $rawChunk .= $token; 696 | } elseif (T_START_HEREDOC === $token[0]) { 697 | $output .= preg_replace(array('/\s+$/Sm','/\n+/S'),"\n", $rawChunk) . $token[1]; 698 | do { 699 | $token = next($tokens); 700 | $output .= $token[1]; 701 | } while ($token[0] !== T_END_HEREDOC); 702 | $rawChunk =''; 703 | } elseif (!in_array($token[0], array(T_COMMENT, T_DOC_COMMENT))) { 704 | $rawChunk .= $token[1]; 705 | } 706 | } 707 | $output .= preg_replace(array('/\s+$/Sm','/\n+/S'),"\n", $rawChunk); 708 | return $output; 709 | } 710 | public function serialize() 711 | { 712 | return serialize(array($this->environment, $this->debug)); 713 | } 714 | public function unserialize($data) 715 | { 716 | list($environment, $debug) = unserialize($data); 717 | $this->__construct($environment, $debug); 718 | } 719 | } 720 | } 721 | namespace Symfony\Component\ClassLoader 722 | { 723 | class ApcClassLoader 724 | { 725 | private $prefix; 726 | protected $decorated; 727 | public function __construct($prefix, $decorated) 728 | { 729 | if (!extension_loaded('apc')) { 730 | throw new \RuntimeException('Unable to use ApcClassLoader as APC is not enabled.'); 731 | } 732 | if (!method_exists($decorated,'findFile')) { 733 | throw new \InvalidArgumentException('The class finder must implement a "findFile" method.'); 734 | } 735 | $this->prefix = $prefix; 736 | $this->decorated = $decorated; 737 | } 738 | public function register($prepend = false) 739 | { 740 | spl_autoload_register(array($this,'loadClass'), true, $prepend); 741 | } 742 | public function unregister() 743 | { 744 | spl_autoload_unregister(array($this,'loadClass')); 745 | } 746 | public function loadClass($class) 747 | { 748 | if ($file = $this->findFile($class)) { 749 | require $file; 750 | return true; 751 | } 752 | } 753 | public function findFile($class) 754 | { 755 | if (false === $file = apc_fetch($this->prefix.$class)) { 756 | apc_store($this->prefix.$class, $file = $this->decorated->findFile($class)); 757 | } 758 | return $file; 759 | } 760 | public function __call($method, $args) 761 | { 762 | return call_user_func_array(array($this->decorated, $method), $args); 763 | } 764 | } 765 | } 766 | namespace Symfony\Component\HttpKernel\Bundle 767 | { 768 | use Symfony\Component\DependencyInjection\ContainerAwareInterface; 769 | use Symfony\Component\DependencyInjection\ContainerBuilder; 770 | use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; 771 | interface BundleInterface extends ContainerAwareInterface 772 | { 773 | public function boot(); 774 | public function shutdown(); 775 | public function build(ContainerBuilder $container); 776 | public function getContainerExtension(); 777 | public function getParent(); 778 | public function getName(); 779 | public function getNamespace(); 780 | public function getPath(); 781 | } 782 | } 783 | namespace Symfony\Component\DependencyInjection 784 | { 785 | abstract class ContainerAware implements ContainerAwareInterface 786 | { 787 | protected $container; 788 | public function setContainer(ContainerInterface $container = null) 789 | { 790 | $this->container = $container; 791 | } 792 | } 793 | } 794 | namespace Symfony\Component\HttpKernel\Bundle 795 | { 796 | use Symfony\Component\DependencyInjection\ContainerAware; 797 | use Symfony\Component\DependencyInjection\ContainerBuilder; 798 | use Symfony\Component\DependencyInjection\Container; 799 | use Symfony\Component\Console\Application; 800 | use Symfony\Component\Finder\Finder; 801 | use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; 802 | abstract class Bundle extends ContainerAware implements BundleInterface 803 | { 804 | protected $name; 805 | protected $reflected; 806 | protected $extension; 807 | public function boot() 808 | { 809 | } 810 | public function shutdown() 811 | { 812 | } 813 | public function build(ContainerBuilder $container) 814 | { 815 | } 816 | public function getContainerExtension() 817 | { 818 | if (null === $this->extension) { 819 | $basename = preg_replace('/Bundle$/','', $this->getName()); 820 | $class = $this->getNamespace().'\\DependencyInjection\\'.$basename.'Extension'; 821 | if (class_exists($class)) { 822 | $extension = new $class(); 823 | $expectedAlias = Container::underscore($basename); 824 | if ($expectedAlias != $extension->getAlias()) { 825 | throw new \LogicException(sprintf('The extension alias for the default extension of a '.'bundle must be the underscored version of the '.'bundle name ("%s" instead of "%s")', 826 | $expectedAlias, $extension->getAlias() 827 | )); 828 | } 829 | $this->extension = $extension; 830 | } else { 831 | $this->extension = false; 832 | } 833 | } 834 | if ($this->extension) { 835 | return $this->extension; 836 | } 837 | } 838 | public function getNamespace() 839 | { 840 | if (null === $this->reflected) { 841 | $this->reflected = new \ReflectionObject($this); 842 | } 843 | return $this->reflected->getNamespaceName(); 844 | } 845 | public function getPath() 846 | { 847 | if (null === $this->reflected) { 848 | $this->reflected = new \ReflectionObject($this); 849 | } 850 | return dirname($this->reflected->getFileName()); 851 | } 852 | public function getParent() 853 | { 854 | return null; 855 | } 856 | final public function getName() 857 | { 858 | if (null !== $this->name) { 859 | return $this->name; 860 | } 861 | $name = get_class($this); 862 | $pos = strrpos($name,'\\'); 863 | return $this->name = false === $pos ? $name : substr($name, $pos + 1); 864 | } 865 | public function registerCommands(Application $application) 866 | { 867 | if (!is_dir($dir = $this->getPath().'/Command')) { 868 | return; 869 | } 870 | $finder = new Finder(); 871 | $finder->files()->name('*Command.php')->in($dir); 872 | $prefix = $this->getNamespace().'\\Command'; 873 | foreach ($finder as $file) { 874 | $ns = $prefix; 875 | if ($relativePath = $file->getRelativePath()) { 876 | $ns .='\\'.strtr($relativePath,'/','\\'); 877 | } 878 | $r = new \ReflectionClass($ns.'\\'.$file->getBasename('.php')); 879 | if ($r->isSubclassOf('Symfony\\Component\\Console\\Command\\Command') && !$r->isAbstract()) { 880 | $application->add($r->newInstance()); 881 | } 882 | } 883 | } 884 | } 885 | } 886 | namespace Symfony\Component\Config 887 | { 888 | use Symfony\Component\Config\Resource\ResourceInterface; 889 | class ConfigCache 890 | { 891 | private $debug; 892 | private $file; 893 | public function __construct($file, $debug) 894 | { 895 | $this->file = $file; 896 | $this->debug = (Boolean) $debug; 897 | } 898 | public function __toString() 899 | { 900 | return $this->file; 901 | } 902 | public function isFresh() 903 | { 904 | if (!is_file($this->file)) { 905 | return false; 906 | } 907 | if (!$this->debug) { 908 | return true; 909 | } 910 | $metadata = $this->file.'.meta'; 911 | if (!is_file($metadata)) { 912 | return false; 913 | } 914 | $time = filemtime($this->file); 915 | $meta = unserialize(file_get_contents($metadata)); 916 | foreach ($meta as $resource) { 917 | if (!$resource->isFresh($time)) { 918 | return false; 919 | } 920 | } 921 | return true; 922 | } 923 | public function write($content, array $metadata = null) 924 | { 925 | $dir = dirname($this->file); 926 | if (!is_dir($dir)) { 927 | if (false === @mkdir($dir, 0777, true)) { 928 | throw new \RuntimeException(sprintf('Unable to create the %s directory', $dir)); 929 | } 930 | } elseif (!is_writable($dir)) { 931 | throw new \RuntimeException(sprintf('Unable to write in the %s directory', $dir)); 932 | } 933 | $tmpFile = tempnam($dir, basename($this->file)); 934 | if (false !== @file_put_contents($tmpFile, $content) && @rename($tmpFile, $this->file)) { 935 | @chmod($this->file, 0666 & ~umask()); 936 | } else { 937 | throw new \RuntimeException(sprintf('Failed to write cache file "%s".', $this->file)); 938 | } 939 | if (null !== $metadata && true === $this->debug) { 940 | $file = $this->file.'.meta'; 941 | $tmpFile = tempnam($dir, basename($file)); 942 | if (false !== @file_put_contents($tmpFile, serialize($metadata)) && @rename($tmpFile, $file)) { 943 | @chmod($file, 0666 & ~umask()); 944 | } 945 | } 946 | } 947 | } 948 | } 949 | namespace Symfony\Component\HttpKernel 950 | { 951 | use Symfony\Component\HttpKernel\Controller\ControllerResolverInterface; 952 | use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; 953 | use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface; 954 | use Symfony\Component\HttpKernel\Event\FilterControllerEvent; 955 | use Symfony\Component\HttpKernel\Event\FilterResponseEvent; 956 | use Symfony\Component\HttpKernel\Event\GetResponseEvent; 957 | use Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent; 958 | use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent; 959 | use Symfony\Component\HttpKernel\Event\PostResponseEvent; 960 | use Symfony\Component\HttpFoundation\Request; 961 | use Symfony\Component\HttpFoundation\Response; 962 | use Symfony\Component\EventDispatcher\EventDispatcherInterface; 963 | class HttpKernel implements HttpKernelInterface, TerminableInterface 964 | { 965 | protected $dispatcher; 966 | protected $resolver; 967 | public function __construct(EventDispatcherInterface $dispatcher, ControllerResolverInterface $resolver) 968 | { 969 | $this->dispatcher = $dispatcher; 970 | $this->resolver = $resolver; 971 | } 972 | public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true) 973 | { 974 | try { 975 | return $this->handleRaw($request, $type); 976 | } catch (\Exception $e) { 977 | if (false === $catch) { 978 | throw $e; 979 | } 980 | return $this->handleException($e, $request, $type); 981 | } 982 | } 983 | public function terminate(Request $request, Response $response) 984 | { 985 | $this->dispatcher->dispatch(KernelEvents::TERMINATE, new PostResponseEvent($this, $request, $response)); 986 | } 987 | private function handleRaw(Request $request, $type = self::MASTER_REQUEST) 988 | { 989 | $event = new GetResponseEvent($this, $request, $type); 990 | $this->dispatcher->dispatch(KernelEvents::REQUEST, $event); 991 | if ($event->hasResponse()) { 992 | return $this->filterResponse($event->getResponse(), $request, $type); 993 | } 994 | if (false === $controller = $this->resolver->getController($request)) { 995 | throw new NotFoundHttpException(sprintf('Unable to find the controller for path "%s". Maybe you forgot to add the matching route in your routing configuration?', $request->getPathInfo())); 996 | } 997 | $event = new FilterControllerEvent($this, $controller, $request, $type); 998 | $this->dispatcher->dispatch(KernelEvents::CONTROLLER, $event); 999 | $controller = $event->getController(); 1000 | $arguments = $this->resolver->getArguments($request, $controller); 1001 | $response = call_user_func_array($controller, $arguments); 1002 | if (!$response instanceof Response) { 1003 | $event = new GetResponseForControllerResultEvent($this, $request, $type, $response); 1004 | $this->dispatcher->dispatch(KernelEvents::VIEW, $event); 1005 | if ($event->hasResponse()) { 1006 | $response = $event->getResponse(); 1007 | } 1008 | if (!$response instanceof Response) { 1009 | $msg = sprintf('The controller must return a response (%s given).', $this->varToString($response)); 1010 | if (null === $response) { 1011 | $msg .=' Did you forget to add a return statement somewhere in your controller?'; 1012 | } 1013 | throw new \LogicException($msg); 1014 | } 1015 | } 1016 | return $this->filterResponse($response, $request, $type); 1017 | } 1018 | private function filterResponse(Response $response, Request $request, $type) 1019 | { 1020 | $event = new FilterResponseEvent($this, $request, $type, $response); 1021 | $this->dispatcher->dispatch(KernelEvents::RESPONSE, $event); 1022 | return $event->getResponse(); 1023 | } 1024 | private function handleException(\Exception $e, $request, $type) 1025 | { 1026 | $event = new GetResponseForExceptionEvent($this, $request, $type, $e); 1027 | $this->dispatcher->dispatch(KernelEvents::EXCEPTION, $event); 1028 | $e = $event->getException(); 1029 | if (!$event->hasResponse()) { 1030 | throw $e; 1031 | } 1032 | $response = $event->getResponse(); 1033 | if ($response->headers->has('X-Status-Code')) { 1034 | $response->setStatusCode($response->headers->get('X-Status-Code')); 1035 | $response->headers->remove('X-Status-Code'); 1036 | } elseif (!$response->isClientError() && !$response->isServerError() && !$response->isRedirect()) { 1037 | if ($e instanceof HttpExceptionInterface) { 1038 | $response->setStatusCode($e->getStatusCode()); 1039 | $response->headers->add($e->getHeaders()); 1040 | } else { 1041 | $response->setStatusCode(500); 1042 | } 1043 | } 1044 | try { 1045 | return $this->filterResponse($response, $request, $type); 1046 | } catch (\Exception $e) { 1047 | return $response; 1048 | } 1049 | } 1050 | private function varToString($var) 1051 | { 1052 | if (is_object($var)) { 1053 | return sprintf('Object(%s)', get_class($var)); 1054 | } 1055 | if (is_array($var)) { 1056 | $a = array(); 1057 | foreach ($var as $k => $v) { 1058 | $a[] = sprintf('%s => %s', $k, $this->varToString($v)); 1059 | } 1060 | return sprintf("Array(%s)", implode(', ', $a)); 1061 | } 1062 | if (is_resource($var)) { 1063 | return sprintf('Resource(%s)', get_resource_type($var)); 1064 | } 1065 | if (null === $var) { 1066 | return'null'; 1067 | } 1068 | if (false === $var) { 1069 | return'false'; 1070 | } 1071 | if (true === $var) { 1072 | return'true'; 1073 | } 1074 | return (string) $var; 1075 | } 1076 | } 1077 | } 1078 | namespace Symfony\Component\HttpKernel\DependencyInjection 1079 | { 1080 | use Symfony\Component\HttpFoundation\Request; 1081 | use Symfony\Component\HttpFoundation\Response; 1082 | use Symfony\Component\HttpKernel\HttpKernelInterface; 1083 | use Symfony\Component\HttpKernel\HttpKernel; 1084 | use Symfony\Component\HttpKernel\Controller\ControllerResolverInterface; 1085 | use Symfony\Component\EventDispatcher\EventDispatcherInterface; 1086 | use Symfony\Component\DependencyInjection\ContainerInterface; 1087 | class ContainerAwareHttpKernel extends HttpKernel 1088 | { 1089 | protected $container; 1090 | public function __construct(EventDispatcherInterface $dispatcher, ContainerInterface $container, ControllerResolverInterface $controllerResolver) 1091 | { 1092 | parent::__construct($dispatcher, $controllerResolver); 1093 | $this->container = $container; 1094 | } 1095 | public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true) 1096 | { 1097 | $request->headers->set('X-Php-Ob-Level', ob_get_level()); 1098 | $this->container->enterScope('request'); 1099 | $this->container->set('request', $request,'request'); 1100 | try { 1101 | $response = parent::handle($request, $type, $catch); 1102 | } catch (\Exception $e) { 1103 | $this->container->leaveScope('request'); 1104 | throw $e; 1105 | } 1106 | $this->container->leaveScope('request'); 1107 | return $response; 1108 | } 1109 | } 1110 | } 1111 | namespace Symfony\Bundle\FrameworkBundle 1112 | { 1113 | use Symfony\Component\HttpFoundation\Response; 1114 | use Symfony\Component\HttpKernel\HttpKernelInterface; 1115 | use Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel; 1116 | class HttpKernel extends ContainerAwareHttpKernel 1117 | { 1118 | public function forward($controller, array $attributes = array(), array $query = array()) 1119 | { 1120 | trigger_error('forward() is deprecated since version 2.2 and will be removed in 2.3.', E_USER_DEPRECATED); 1121 | $attributes['_controller'] = $controller; 1122 | $subRequest = $this->container->get('request')->duplicate($query, null, $attributes); 1123 | return $this->handle($subRequest, HttpKernelInterface::SUB_REQUEST); 1124 | } 1125 | public function render($uri, array $options = array()) 1126 | { 1127 | trigger_error('render() is deprecated since version 2.2 and will be removed in 2.3. Use Symfony\Component\HttpKernel\Fragment\FragmentHandler::render() instead.', E_USER_DEPRECATED); 1128 | $options = $this->renderer->fixOptions($options); 1129 | $strategy = isset($options['strategy']) ? $options['strategy'] :'default'; 1130 | unset($options['strategy']); 1131 | $this->container->get('fragment.handler')->render($uri, $strategy, $options); 1132 | } 1133 | } 1134 | } 1135 | 1136 | namespace { return $loader; } 1137 | -------------------------------------------------------------------------------- /app/check.php: -------------------------------------------------------------------------------- 1 | getPhpIniConfigPath(); 8 | 9 | echo "********************************\n"; 10 | echo "* *\n"; 11 | echo "* Symfony requirements check *\n"; 12 | echo "* *\n"; 13 | echo "********************************\n\n"; 14 | 15 | echo $iniPath ? sprintf("* Configuration file used by PHP: %s\n\n", $iniPath) : "* WARNING: No configuration file (php.ini) used by PHP!\n\n"; 16 | 17 | echo "** ATTENTION **\n"; 18 | echo "* The PHP CLI can use a different php.ini file\n"; 19 | echo "* than the one used with your web server.\n"; 20 | if ('\\' == DIRECTORY_SEPARATOR) { 21 | echo "* (especially on the Windows platform)\n"; 22 | } 23 | echo "* To be on the safe side, please also launch the requirements check\n"; 24 | echo "* from your web server using the web/config.php script.\n"; 25 | 26 | echo_title('Mandatory requirements'); 27 | 28 | foreach ($symfonyRequirements->getRequirements() as $req) { 29 | echo_requirement($req); 30 | } 31 | 32 | echo_title('Optional recommendations'); 33 | 34 | foreach ($symfonyRequirements->getRecommendations() as $req) { 35 | echo_requirement($req); 36 | } 37 | 38 | /** 39 | * Prints a Requirement instance 40 | */ 41 | function echo_requirement(Requirement $requirement) 42 | { 43 | $result = $requirement->isFulfilled() ? 'OK' : ($requirement->isOptional() ? 'WARNING' : 'ERROR'); 44 | echo ' ' . str_pad($result, 9); 45 | echo $requirement->getTestMessage() . "\n"; 46 | 47 | if (!$requirement->isFulfilled()) { 48 | echo sprintf(" %s\n\n", $requirement->getHelpText()); 49 | } 50 | } 51 | 52 | function echo_title($title) 53 | { 54 | echo "\n** $title **\n\n"; 55 | } 56 | -------------------------------------------------------------------------------- /app/config/config.yml: -------------------------------------------------------------------------------- 1 | imports: 2 | - { resource: parameters.yml } 3 | 4 | framework: 5 | secret: "%secret%" 6 | router: 7 | resource: "%kernel.root_dir%/config/routing.yml" 8 | strict_requirements: "%kernel.debug%" 9 | form: true 10 | csrf_protection: true 11 | validation: { enable_annotations: true } 12 | templating: { engines: ['twig'] } #assets_version: SomeVersionScheme 13 | default_locale: "%locale%" 14 | trust_proxy_headers: false # Deprecated in 2.0; will be removed in 2.3 (used trusted_proxies instead) 15 | trusted_proxies: ~ 16 | session: ~ 17 | fragments: ~ 18 | 19 | # Twig Configuration 20 | twig: 21 | debug: "%kernel.debug%" 22 | strict_variables: "%kernel.debug%" 23 | 24 | # Assetic Configuration 25 | assetic: 26 | debug: "%kernel.debug%" 27 | use_controller: false 28 | bundles: [TerrificComposition,TerrificCoreBundle,TerrificComposerBundle] 29 | filters: 30 | cssrewrite: ~ 31 | terrificrewrite: 32 | resource: %kernel.root_dir%/../vendor/brunschgi/terrific-core-bundle/Terrific/CoreBundle/Resources/config/terrificrewrite.xml 33 | lessphp: 34 | apply_to: "\.less$" 35 | file: %kernel.root_dir%/../vendor/leafo/lessphp/lessc.inc.php 36 | 37 | terrific_composer: 38 | composition_bundles: [@TerrificComposition] 39 | module_layout: @TerrificComposition::base.html.twig -------------------------------------------------------------------------------- /app/config/config_dev.yml: -------------------------------------------------------------------------------- 1 | imports: 2 | - { resource: config.yml } 3 | 4 | framework: 5 | router: { resource: "%kernel.root_dir%/config/routing_dev.yml" } 6 | 7 | monolog: 8 | handlers: 9 | main: 10 | type: stream 11 | path: %kernel.logs_dir%/%kernel.environment%.log 12 | level: warning 13 | firephp: 14 | type: firephp 15 | level: warning 16 | 17 | assetic: 18 | use_controller: true 19 | debug: false 20 | 21 | terrific_composer: 22 | toolbar: true 23 | 24 | terrific_core: 25 | copy_images: true -------------------------------------------------------------------------------- /app/config/config_prod.yml: -------------------------------------------------------------------------------- 1 | imports: 2 | - { resource: config.yml } 3 | 4 | monolog: 5 | handlers: 6 | main: 7 | type: fingers_crossed 8 | action_level: error 9 | handler: nested 10 | nested: 11 | type: stream 12 | path: %kernel.logs_dir%/%kernel.environment%.log 13 | level: debug 14 | 15 | assetic: 16 | filters: 17 | cssmin: 18 | apply_to: "\.css$" 19 | file: %kernel.root_dir%/../vendor/natxet/CssMin/src/CssMin.php 20 | 21 | jsmin: 22 | apply_to: "\.js$" 23 | file: %kernel.root_dir%/../vendor/nick4fake/jsmin/JsMin/Minify.php 24 | resource: %kernel.root_dir%/../vendor/brunschgi/terrific-core-bundle/Terrific/CoreBundle/Resources/config/jsmin.xml -------------------------------------------------------------------------------- /app/config/config_test.yml: -------------------------------------------------------------------------------- 1 | imports: 2 | - { resource: config_dev.yml } 3 | 4 | framework: 5 | test: ~ 6 | session: 7 | storage_id: session.storage.mock_file 8 | 9 | web_profiler: 10 | toolbar: false 11 | intercept_redirects: false -------------------------------------------------------------------------------- /app/config/parameters.yml: -------------------------------------------------------------------------------- 1 | parameters: 2 | locale: en 3 | secret: ThisTokenIsNotSoSecretChangeIt 4 | -------------------------------------------------------------------------------- /app/config/routing.yml: -------------------------------------------------------------------------------- 1 | TerrificComposition: 2 | resource: "@TerrificComposition/Controller/" 3 | type: annotation 4 | prefix: / 5 | 6 | TerrificComposerBundle: 7 | resource: "@TerrificComposerBundle/Controller/" 8 | type: annotation 9 | prefix: /terrific/composer 10 | -------------------------------------------------------------------------------- /app/config/routing_dev.yml: -------------------------------------------------------------------------------- 1 | _assetic: 2 | resource: . 3 | type: assetic 4 | 5 | _main: 6 | resource: routing.yml -------------------------------------------------------------------------------- /app/console: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | getParameterOption(array('--env', '-e'), getenv('SYMFONY_ENV') ?: 'dev'); 18 | $debug = !$input->hasParameterOption(array('--no-debug', '')); 19 | 20 | $kernel = new AppKernel($env, $debug); 21 | $application = new Application($kernel); 22 | $application->run(); 23 | -------------------------------------------------------------------------------- /app/phpunit.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 15 | 16 | 17 | 18 | ../src/*/*Bundle/Tests 19 | ../src/*/Bundle/*Bundle/Tests 20 | 21 | 22 | 23 | 28 | 29 | 30 | 31 | ../src 32 | 33 | ../src/*/*Bundle/Resources 34 | ../src/*/*Bundle/Tests 35 | ../src/*/Bundle/*Bundle/Resources 36 | ../src/*/Bundle/*Bundle/Tests 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "brunschgi/terrific-composer", 3 | "description": "The \"Terrific Composer\" distribution", 4 | "autoload": { 5 | "psr-0": { "": "src/" } 6 | }, 7 | "require": { 8 | "php": ">=5.3.3", 9 | "symfony/symfony": "2.2.*", 10 | "doctrine/doctrine-bundle": "1.2.*", 11 | "twig/extensions": "1.0.*", 12 | "symfony/assetic-bundle": "2.1.*", 13 | "symfony/monolog-bundle": "2.2.*", 14 | "sensio/distribution-bundle": "2.2.*", 15 | "sensio/framework-extra-bundle": "2.2.*", 16 | "brunschgi/terrific-core-bundle": "dev-master", 17 | "brunschgi/terrific-composer-bundle": "dev-master", 18 | "leafo/lessphp": "dev-master", 19 | "nick4fake/jsmin": "dev-master", 20 | "natxet/CssMin": "dev-master" 21 | }, 22 | "scripts": { 23 | "post-install-cmd": [ 24 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", 25 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", 26 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", 27 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile" 28 | ], 29 | "post-update-cmd": [ 30 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", 31 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", 32 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", 33 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile" 34 | ] 35 | }, 36 | "config": { 37 | "bin-dir": "bin" 38 | }, 39 | "minimum-stability": "alpha", 40 | "extra": { 41 | "symfony-app-dir": "app", 42 | "symfony-web-dir": "web" 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /composer.lock: -------------------------------------------------------------------------------- 1 | { 2 | "_readme": [ 3 | "This file locks the dependencies of your project to a known state", 4 | "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file" 5 | ], 6 | "hash": "3d52ad4413cb8f22aa011c2840e41251", 7 | "packages": [ 8 | { 9 | "name": "brunschgi/terrific-composer-bundle", 10 | "version": "dev-master", 11 | "target-dir": "Terrific/ComposerBundle", 12 | "source": { 13 | "type": "git", 14 | "url": "https://github.com/brunschgi/TerrificComposerBundle.git", 15 | "reference": "f0cbc30af41329e7acd7ea90b7abc89834a62dd1" 16 | }, 17 | "dist": { 18 | "type": "zip", 19 | "url": "https://api.github.com/repos/brunschgi/TerrificComposerBundle/zipball/f0cbc30af41329e7acd7ea90b7abc89834a62dd1", 20 | "reference": "f0cbc30af41329e7acd7ea90b7abc89834a62dd1", 21 | "shasum": "" 22 | }, 23 | "require": { 24 | "symfony/form": "2.2.*", 25 | "symfony/framework-bundle": "2.2.*", 26 | "symfony/validator": "2.2.*" 27 | }, 28 | "require-dev": { 29 | "symfony/console": "2.2.*", 30 | "symfony/filesystem": "2.2.*", 31 | "symfony/finder": "2.2.*", 32 | "symfony/yaml": "2.2.*" 33 | }, 34 | "type": "symfony-bundle", 35 | "autoload": { 36 | "psr-0": { 37 | "Terrific\\ComposerBundle": "" 38 | } 39 | }, 40 | "notification-url": "https://packagist.org/downloads/", 41 | "license": [ 42 | "MIT" 43 | ], 44 | "authors": [ 45 | { 46 | "name": "Remo Brunschwiler", 47 | "homepage": "http://terrifically.org" 48 | }, 49 | { 50 | "name": "Terrific Symfony Community", 51 | "homepage": "https://github.com/brunschgi/TerrificComposerBundle/contributors" 52 | } 53 | ], 54 | "description": "Makes it easy to develop frontends based on the terrific concept", 55 | "keywords": [ 56 | "frontend", 57 | "terrific" 58 | ], 59 | "time": "2013-04-29 18:07:18" 60 | }, 61 | { 62 | "name": "brunschgi/terrific-core-bundle", 63 | "version": "dev-master", 64 | "target-dir": "Terrific/CoreBundle", 65 | "source": { 66 | "type": "git", 67 | "url": "https://github.com/brunschgi/TerrificCoreBundle.git", 68 | "reference": "v1.0.1" 69 | }, 70 | "dist": { 71 | "type": "zip", 72 | "url": "https://api.github.com/repos/brunschgi/TerrificCoreBundle/zipball/v1.0.1", 73 | "reference": "v1.0.1", 74 | "shasum": "" 75 | }, 76 | "require": { 77 | "symfony/framework-bundle": "2.2.*" 78 | }, 79 | "require-dev": { 80 | "symfony/console": "2.2.*", 81 | "symfony/filesystem": "2.2.*", 82 | "symfony/finder": "2.2.*", 83 | "symfony/yaml": "2.2.*", 84 | "twig/twig": "1.12.x-dev" 85 | }, 86 | "type": "symfony-bundle", 87 | "autoload": { 88 | "psr-0": { 89 | "Terrific\\CoreBundle": "" 90 | } 91 | }, 92 | "notification-url": "https://packagist.org/downloads/", 93 | "license": [ 94 | "MIT" 95 | ], 96 | "authors": [ 97 | { 98 | "name": "Remo Brunschwiler", 99 | "homepage": "http://terrifically.org" 100 | }, 101 | { 102 | "name": "Terrific Symfony Community", 103 | "homepage": "https://github.com/brunschgi/TerrificCoreBundle/contributors" 104 | } 105 | ], 106 | "description": "Enables development of frontends based on the terrific concept", 107 | "keywords": [ 108 | "frontend", 109 | "terrific" 110 | ], 111 | "time": "2013-04-25 15:38:44" 112 | }, 113 | { 114 | "name": "doctrine/annotations", 115 | "version": "v1.1.1", 116 | "source": { 117 | "type": "git", 118 | "url": "https://github.com/doctrine/annotations.git", 119 | "reference": "v1.1.1" 120 | }, 121 | "dist": { 122 | "type": "zip", 123 | "url": "https://api.github.com/repos/doctrine/annotations/zipball/v1.1.1", 124 | "reference": "v1.1.1", 125 | "shasum": "" 126 | }, 127 | "require": { 128 | "doctrine/lexer": "1.*", 129 | "php": ">=5.3.2" 130 | }, 131 | "require-dev": { 132 | "doctrine/cache": "1.*" 133 | }, 134 | "type": "library", 135 | "extra": { 136 | "branch-alias": { 137 | "dev-master": "1.0.x-dev" 138 | } 139 | }, 140 | "autoload": { 141 | "psr-0": { 142 | "Doctrine\\Common\\Annotations\\": "lib/" 143 | } 144 | }, 145 | "notification-url": "https://packagist.org/downloads/", 146 | "license": [ 147 | "MIT" 148 | ], 149 | "authors": [ 150 | { 151 | "name": "Jonathan Wage", 152 | "email": "jonwage@gmail.com", 153 | "homepage": "http://www.jwage.com/" 154 | }, 155 | { 156 | "name": "Guilherme Blanco", 157 | "email": "guilhermeblanco@gmail.com", 158 | "homepage": "http://www.instaclick.com" 159 | }, 160 | { 161 | "name": "Roman Borschel", 162 | "email": "roman@code-factory.org" 163 | }, 164 | { 165 | "name": "Benjamin Eberlei", 166 | "email": "kontakt@beberlei.de" 167 | }, 168 | { 169 | "name": "Johannes Schmitt", 170 | "email": "schmittjoh@gmail.com", 171 | "homepage": "https://github.com/schmittjoh", 172 | "role": "Developer of wrapped JMSSerializerBundle" 173 | } 174 | ], 175 | "description": "Docblock Annotations Parser", 176 | "homepage": "http://www.doctrine-project.org", 177 | "keywords": [ 178 | "annotations", 179 | "docblock", 180 | "parser" 181 | ], 182 | "time": "2013-04-20 08:30:17" 183 | }, 184 | { 185 | "name": "doctrine/cache", 186 | "version": "v1.0", 187 | "source": { 188 | "type": "git", 189 | "url": "https://github.com/doctrine/cache.git", 190 | "reference": "v1.0" 191 | }, 192 | "dist": { 193 | "type": "zip", 194 | "url": "https://github.com/doctrine/cache/archive/v1.0.zip", 195 | "reference": "v1.0", 196 | "shasum": "" 197 | }, 198 | "require": { 199 | "php": ">=5.3.2" 200 | }, 201 | "type": "library", 202 | "autoload": { 203 | "psr-0": { 204 | "Doctrine\\Common\\Cache\\": "lib/" 205 | } 206 | }, 207 | "notification-url": "https://packagist.org/downloads/", 208 | "license": [ 209 | "MIT" 210 | ], 211 | "authors": [ 212 | { 213 | "name": "Jonathan Wage", 214 | "email": "jonwage@gmail.com", 215 | "homepage": "http://www.jwage.com/" 216 | }, 217 | { 218 | "name": "Guilherme Blanco", 219 | "email": "guilhermeblanco@gmail.com", 220 | "homepage": "http://www.instaclick.com" 221 | }, 222 | { 223 | "name": "Roman Borschel", 224 | "email": "roman@code-factory.org" 225 | }, 226 | { 227 | "name": "Benjamin Eberlei", 228 | "email": "kontakt@beberlei.de" 229 | }, 230 | { 231 | "name": "Johannes Schmitt", 232 | "email": "schmittjoh@gmail.com", 233 | "homepage": "http://jmsyst.com", 234 | "role": "Developer of wrapped JMSSerializerBundle" 235 | } 236 | ], 237 | "description": "Caching library offering an object-oriented API for many cache backends", 238 | "homepage": "http://www.doctrine-project.org", 239 | "keywords": [ 240 | "cache", 241 | "caching" 242 | ], 243 | "time": "2013-01-10 22:43:46" 244 | }, 245 | { 246 | "name": "doctrine/collections", 247 | "version": "v1.1", 248 | "source": { 249 | "type": "git", 250 | "url": "https://github.com/doctrine/collections.git", 251 | "reference": "v1.1" 252 | }, 253 | "dist": { 254 | "type": "zip", 255 | "url": "https://api.github.com/repos/doctrine/collections/zipball/v1.1", 256 | "reference": "v1.1", 257 | "shasum": "" 258 | }, 259 | "require": { 260 | "php": ">=5.3.2" 261 | }, 262 | "type": "library", 263 | "extra": { 264 | "branch-alias": { 265 | "dev-master": "1.1.x-dev" 266 | } 267 | }, 268 | "autoload": { 269 | "psr-0": { 270 | "Doctrine\\Common\\Collections\\": "lib/" 271 | } 272 | }, 273 | "notification-url": "https://packagist.org/downloads/", 274 | "license": [ 275 | "MIT" 276 | ], 277 | "authors": [ 278 | { 279 | "name": "Jonathan Wage", 280 | "email": "jonwage@gmail.com", 281 | "homepage": "http://www.jwage.com/" 282 | }, 283 | { 284 | "name": "Guilherme Blanco", 285 | "email": "guilhermeblanco@gmail.com", 286 | "homepage": "http://www.instaclick.com" 287 | }, 288 | { 289 | "name": "Roman Borschel", 290 | "email": "roman@code-factory.org" 291 | }, 292 | { 293 | "name": "Benjamin Eberlei", 294 | "email": "kontakt@beberlei.de" 295 | }, 296 | { 297 | "name": "Johannes Schmitt", 298 | "email": "schmittjoh@gmail.com", 299 | "homepage": "http://jmsyst.com", 300 | "role": "Developer of wrapped JMSSerializerBundle" 301 | } 302 | ], 303 | "description": "Collections Abstraction library", 304 | "homepage": "http://www.doctrine-project.org", 305 | "keywords": [ 306 | "array", 307 | "collections", 308 | "iterator" 309 | ], 310 | "time": "2013-03-07 12:15:54" 311 | }, 312 | { 313 | "name": "doctrine/common", 314 | "version": "2.4.0-RC1", 315 | "source": { 316 | "type": "git", 317 | "url": "https://github.com/doctrine/common.git", 318 | "reference": "2.4.0-RC1" 319 | }, 320 | "dist": { 321 | "type": "zip", 322 | "url": "https://api.github.com/repos/doctrine/common/zipball/2.4.0-RC1", 323 | "reference": "2.4.0-RC1", 324 | "shasum": "" 325 | }, 326 | "require": { 327 | "doctrine/annotations": "1.*", 328 | "doctrine/cache": "1.*", 329 | "doctrine/collections": "1.*", 330 | "doctrine/inflector": "1.*", 331 | "doctrine/lexer": "1.*", 332 | "php": ">=5.3.2" 333 | }, 334 | "type": "library", 335 | "extra": { 336 | "branch-alias": { 337 | "dev-master": "2.4.x-dev" 338 | } 339 | }, 340 | "autoload": { 341 | "psr-0": { 342 | "Doctrine\\Common\\": "lib/" 343 | } 344 | }, 345 | "notification-url": "https://packagist.org/downloads/", 346 | "license": [ 347 | "MIT" 348 | ], 349 | "authors": [ 350 | { 351 | "name": "Jonathan Wage", 352 | "email": "jonwage@gmail.com", 353 | "homepage": "http://www.jwage.com/" 354 | }, 355 | { 356 | "name": "Guilherme Blanco", 357 | "email": "guilhermeblanco@gmail.com", 358 | "homepage": "http://www.instaclick.com" 359 | }, 360 | { 361 | "name": "Roman Borschel", 362 | "email": "roman@code-factory.org" 363 | }, 364 | { 365 | "name": "Benjamin Eberlei", 366 | "email": "kontakt@beberlei.de" 367 | }, 368 | { 369 | "name": "Johannes Schmitt", 370 | "email": "schmittjoh@gmail.com", 371 | "homepage": "https://github.com/schmittjoh", 372 | "role": "Developer of wrapped JMSSerializerBundle" 373 | } 374 | ], 375 | "description": "Common Library for Doctrine projects", 376 | "homepage": "http://www.doctrine-project.org", 377 | "keywords": [ 378 | "annotations", 379 | "collections", 380 | "eventmanager", 381 | "persistence", 382 | "spl" 383 | ], 384 | "time": "2013-03-24 17:52:34" 385 | }, 386 | { 387 | "name": "doctrine/dbal", 388 | "version": "2.3.3", 389 | "source": { 390 | "type": "git", 391 | "url": "https://github.com/doctrine/dbal.git", 392 | "reference": "2.3.3" 393 | }, 394 | "dist": { 395 | "type": "zip", 396 | "url": "https://api.github.com/repos/doctrine/dbal/zipball/2.3.3", 397 | "reference": "2.3.3", 398 | "shasum": "" 399 | }, 400 | "require": { 401 | "doctrine/common": ">=2.3.0,<2.5-dev", 402 | "php": ">=5.3.2" 403 | }, 404 | "type": "library", 405 | "extra": { 406 | "branch-alias": { 407 | "dev-master": "2.3.x-dev" 408 | } 409 | }, 410 | "autoload": { 411 | "psr-0": { 412 | "Doctrine\\DBAL": "lib/" 413 | } 414 | }, 415 | "notification-url": "https://packagist.org/downloads/", 416 | "license": [ 417 | "MIT" 418 | ], 419 | "authors": [ 420 | { 421 | "name": "Jonathan Wage", 422 | "email": "jonwage@gmail.com", 423 | "homepage": "http://www.jwage.com/" 424 | }, 425 | { 426 | "name": "Guilherme Blanco", 427 | "email": "guilhermeblanco@gmail.com", 428 | "homepage": "http://www.instaclick.com" 429 | }, 430 | { 431 | "name": "Roman Borschel", 432 | "email": "roman@code-factory.org" 433 | }, 434 | { 435 | "name": "Benjamin Eberlei", 436 | "email": "kontakt@beberlei.de" 437 | } 438 | ], 439 | "description": "Database Abstraction Layer", 440 | "homepage": "http://www.doctrine-project.org", 441 | "keywords": [ 442 | "database", 443 | "dbal", 444 | "persistence", 445 | "queryobject" 446 | ], 447 | "time": "2013-03-24 19:16:29" 448 | }, 449 | { 450 | "name": "doctrine/doctrine-bundle", 451 | "version": "v1.2.0", 452 | "target-dir": "Doctrine/Bundle/DoctrineBundle", 453 | "source": { 454 | "type": "git", 455 | "url": "https://github.com/doctrine/DoctrineBundle.git", 456 | "reference": "v1.2.0" 457 | }, 458 | "dist": { 459 | "type": "zip", 460 | "url": "https://api.github.com/repos/doctrine/DoctrineBundle/zipball/v1.2.0", 461 | "reference": "v1.2.0", 462 | "shasum": "" 463 | }, 464 | "require": { 465 | "doctrine/dbal": ">=2.2,<2.5-dev", 466 | "jdorn/sql-formatter": ">=1.1,<2.0", 467 | "php": ">=5.3.2", 468 | "symfony/doctrine-bridge": ">=2.2,<3.0", 469 | "symfony/framework-bundle": ">=2.2,<3.0" 470 | }, 471 | "require-dev": { 472 | "doctrine/orm": ">=2.2,<2.5-dev", 473 | "symfony/validator": ">=2.2,<3.0", 474 | "symfony/yaml": ">=2.2,<3.0" 475 | }, 476 | "suggest": { 477 | "doctrine/orm": "The Doctrine ORM integration is optional in the bundle.", 478 | "symfony/web-profiler-bundle": "to use the data collector" 479 | }, 480 | "type": "symfony-bundle", 481 | "extra": { 482 | "branch-alias": { 483 | "dev-master": "1.2.x-dev" 484 | } 485 | }, 486 | "autoload": { 487 | "psr-0": { 488 | "Doctrine\\Bundle\\DoctrineBundle": "" 489 | } 490 | }, 491 | "notification-url": "https://packagist.org/downloads/", 492 | "license": [ 493 | "MIT" 494 | ], 495 | "authors": [ 496 | { 497 | "name": "Fabien Potencier", 498 | "email": "fabien@symfony.com" 499 | }, 500 | { 501 | "name": "Symfony Community", 502 | "homepage": "http://symfony.com/contributors" 503 | }, 504 | { 505 | "name": "Benjamin Eberlei", 506 | "email": "kontakt@beberlei.de" 507 | } 508 | ], 509 | "description": "Symfony DoctrineBundle", 510 | "homepage": "http://www.doctrine-project.org", 511 | "keywords": [ 512 | "database", 513 | "dbal", 514 | "orm", 515 | "persistence" 516 | ], 517 | "time": "2013-03-25 20:13:59" 518 | }, 519 | { 520 | "name": "doctrine/inflector", 521 | "version": "v1.0", 522 | "source": { 523 | "type": "git", 524 | "url": "https://github.com/doctrine/inflector.git", 525 | "reference": "v1.0" 526 | }, 527 | "dist": { 528 | "type": "zip", 529 | "url": "https://github.com/doctrine/inflector/archive/v1.0.zip", 530 | "reference": "v1.0", 531 | "shasum": "" 532 | }, 533 | "require": { 534 | "php": ">=5.3.2" 535 | }, 536 | "type": "library", 537 | "autoload": { 538 | "psr-0": { 539 | "Doctrine\\Common\\Inflector\\": "lib/" 540 | } 541 | }, 542 | "notification-url": "https://packagist.org/downloads/", 543 | "license": [ 544 | "MIT" 545 | ], 546 | "authors": [ 547 | { 548 | "name": "Jonathan Wage", 549 | "email": "jonwage@gmail.com", 550 | "homepage": "http://www.jwage.com/" 551 | }, 552 | { 553 | "name": "Guilherme Blanco", 554 | "email": "guilhermeblanco@gmail.com", 555 | "homepage": "http://www.instaclick.com" 556 | }, 557 | { 558 | "name": "Roman Borschel", 559 | "email": "roman@code-factory.org" 560 | }, 561 | { 562 | "name": "Benjamin Eberlei", 563 | "email": "kontakt@beberlei.de" 564 | }, 565 | { 566 | "name": "Johannes Schmitt", 567 | "email": "schmittjoh@gmail.com", 568 | "homepage": "https://github.com/schmittjoh", 569 | "role": "Developer of wrapped JMSSerializerBundle" 570 | } 571 | ], 572 | "description": "Common String Manipulations with regard to casing and singular/plural rules.", 573 | "homepage": "http://www.doctrine-project.org", 574 | "keywords": [ 575 | "inflection", 576 | "pluarlize", 577 | "singuarlize", 578 | "string" 579 | ], 580 | "time": "2013-01-10 21:49:15" 581 | }, 582 | { 583 | "name": "doctrine/lexer", 584 | "version": "v1.0", 585 | "source": { 586 | "type": "git", 587 | "url": "https://github.com/doctrine/lexer.git", 588 | "reference": "v1.0" 589 | }, 590 | "dist": { 591 | "type": "zip", 592 | "url": "https://github.com/doctrine/lexer/archive/v1.0.zip", 593 | "reference": "v1.0", 594 | "shasum": "" 595 | }, 596 | "require": { 597 | "php": ">=5.3.2" 598 | }, 599 | "type": "library", 600 | "autoload": { 601 | "psr-0": { 602 | "Doctrine\\Common\\Lexer\\": "lib/" 603 | } 604 | }, 605 | "notification-url": "https://packagist.org/downloads/", 606 | "license": [ 607 | "MIT" 608 | ], 609 | "authors": [ 610 | { 611 | "name": "Guilherme Blanco", 612 | "email": "guilhermeblanco@gmail.com", 613 | "homepage": "http://www.instaclick.com" 614 | }, 615 | { 616 | "name": "Roman Borschel", 617 | "email": "roman@code-factory.org" 618 | }, 619 | { 620 | "name": "Johannes Schmitt", 621 | "email": "schmittjoh@gmail.com", 622 | "homepage": "https://github.com/schmittjoh", 623 | "role": "Developer of wrapped JMSSerializerBundle" 624 | } 625 | ], 626 | "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.", 627 | "homepage": "http://www.doctrine-project.org", 628 | "keywords": [ 629 | "lexer", 630 | "parser" 631 | ], 632 | "time": "2013-01-12 18:59:04" 633 | }, 634 | { 635 | "name": "jdorn/sql-formatter", 636 | "version": "v1.2.9", 637 | "source": { 638 | "type": "git", 639 | "url": "https://github.com/jdorn/sql-formatter.git", 640 | "reference": "v1.2.9" 641 | }, 642 | "dist": { 643 | "type": "zip", 644 | "url": "https://api.github.com/repos/jdorn/sql-formatter/zipball/v1.2.9", 645 | "reference": "v1.2.9", 646 | "shasum": "" 647 | }, 648 | "require": { 649 | "php": ">=5.2.4" 650 | }, 651 | "require-dev": { 652 | "phpunit/phpunit": "3.7.*" 653 | }, 654 | "type": "library", 655 | "extra": { 656 | "branch-alias": { 657 | "dev-master": "1.3.x-dev" 658 | } 659 | }, 660 | "autoload": { 661 | "classmap": [ 662 | "lib" 663 | ] 664 | }, 665 | "notification-url": "https://packagist.org/downloads/", 666 | "license": [ 667 | "MIT" 668 | ], 669 | "authors": [ 670 | { 671 | "name": "Jeremy Dorn", 672 | "email": "jeremy@jeremydorn.com", 673 | "homepage": "http://jeremydorn.com/" 674 | } 675 | ], 676 | "description": "a PHP SQL highlighting library", 677 | "homepage": "https://github.com/jdorn/sql-formatter/", 678 | "keywords": [ 679 | "highlight", 680 | "sql" 681 | ], 682 | "time": "2013-04-26 18:42:52" 683 | }, 684 | { 685 | "name": "kriswallsmith/assetic", 686 | "version": "v1.1.0-alpha4", 687 | "source": { 688 | "type": "git", 689 | "url": "https://github.com/kriswallsmith/assetic.git", 690 | "reference": "v1.1.0-alpha4" 691 | }, 692 | "dist": { 693 | "type": "zip", 694 | "url": "https://api.github.com/repos/kriswallsmith/assetic/zipball/v1.1.0-alpha4", 695 | "reference": "v1.1.0-alpha4", 696 | "shasum": "" 697 | }, 698 | "require": { 699 | "php": ">=5.3.1", 700 | "symfony/process": ">=2.1.0,<2.3-dev" 701 | }, 702 | "require-dev": { 703 | "cssmin/cssmin": "*", 704 | "joliclic/javascript-packer": "*", 705 | "kamicane/packager": "*", 706 | "leafo/lessphp": "*", 707 | "leafo/scssphp": "*", 708 | "leafo/scssphp-compass": "*", 709 | "mrclay/minify": "*", 710 | "phpunit/phpunit": "3.7.*", 711 | "ptachoire/cssembed": "*", 712 | "twig/twig": ">=1.6.0,<2.0" 713 | }, 714 | "suggest": { 715 | "leafo/lessphp": "Assetic provides the integration with the lessphp LESS compiler", 716 | "leafo/scssphp": "Assetic provides the integration with the scssphp SCSS compiler", 717 | "leafo/scssphp-compass": "Assetic provides the integration with the SCSS compass plugin", 718 | "ptachoire/cssembed": "Assetic provides the integration with phpcssembed to embed data uris", 719 | "twig/twig": "Assetic provides the integration with the Twig templating engine" 720 | }, 721 | "type": "library", 722 | "extra": { 723 | "branch-alias": { 724 | "dev-master": "1.1-dev" 725 | } 726 | }, 727 | "autoload": { 728 | "psr-0": { 729 | "Assetic": "src/" 730 | }, 731 | "files": [ 732 | "src/functions.php" 733 | ] 734 | }, 735 | "notification-url": "https://packagist.org/downloads/", 736 | "license": [ 737 | "MIT" 738 | ], 739 | "authors": [ 740 | { 741 | "name": "Kris Wallsmith", 742 | "email": "kris.wallsmith@gmail.com", 743 | "homepage": "http://kriswallsmith.net/" 744 | } 745 | ], 746 | "description": "Asset Management for PHP", 747 | "homepage": "https://github.com/kriswallsmith/assetic", 748 | "keywords": [ 749 | "assets", 750 | "compression", 751 | "minification" 752 | ], 753 | "time": "2013-02-24 17:22:20" 754 | }, 755 | { 756 | "name": "leafo/lessphp", 757 | "version": "dev-master", 758 | "source": { 759 | "type": "git", 760 | "url": "https://github.com/leafo/lessphp.git", 761 | "reference": "51aad6ef903bdcb18280ae81fb85016a078232a0" 762 | }, 763 | "dist": { 764 | "type": "zip", 765 | "url": "https://api.github.com/repos/leafo/lessphp/zipball/51aad6ef903bdcb18280ae81fb85016a078232a0", 766 | "reference": "51aad6ef903bdcb18280ae81fb85016a078232a0", 767 | "shasum": "" 768 | }, 769 | "type": "library", 770 | "extra": { 771 | "branch-alias": { 772 | "dev-master": "0.3-dev" 773 | } 774 | }, 775 | "autoload": { 776 | "classmap": [ 777 | "lessc.inc.php" 778 | ] 779 | }, 780 | "notification-url": "https://packagist.org/downloads/", 781 | "license": [ 782 | "MIT", 783 | "GPL-3.0" 784 | ], 785 | "authors": [ 786 | { 787 | "name": "Leaf Corcoran", 788 | "email": "leafot@gmail.com", 789 | "homepage": "http://leafo.net" 790 | } 791 | ], 792 | "description": "lessphp is a compiler for LESS written in PHP.", 793 | "homepage": "http://leafo.net/lessphp/", 794 | "time": "2013-04-09 01:25:49" 795 | }, 796 | { 797 | "name": "monolog/monolog", 798 | "version": "1.5.0", 799 | "source": { 800 | "type": "git", 801 | "url": "https://github.com/Seldaek/monolog.git", 802 | "reference": "1.5.0" 803 | }, 804 | "dist": { 805 | "type": "zip", 806 | "url": "https://api.github.com/repos/Seldaek/monolog/zipball/1.5.0", 807 | "reference": "1.5.0", 808 | "shasum": "" 809 | }, 810 | "require": { 811 | "php": ">=5.3.0", 812 | "psr/log": ">=1.0,<2.0" 813 | }, 814 | "require-dev": { 815 | "doctrine/couchdb": "dev-master", 816 | "mlehner/gelf-php": "1.0.*", 817 | "raven/raven": "0.3.*" 818 | }, 819 | "suggest": { 820 | "doctrine/couchdb": "Allow sending log messages to a CouchDB server", 821 | "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", 822 | "ext-mongo": "Allow sending log messages to a MongoDB server", 823 | "mlehner/gelf-php": "Allow sending log messages to a GrayLog2 server", 824 | "raven/raven": "Allow sending log messages to a Sentry server" 825 | }, 826 | "type": "library", 827 | "extra": { 828 | "branch-alias": { 829 | "dev-master": "1.4.x-dev" 830 | } 831 | }, 832 | "autoload": { 833 | "psr-0": { 834 | "Monolog": "src/" 835 | } 836 | }, 837 | "notification-url": "https://packagist.org/downloads/", 838 | "license": [ 839 | "MIT" 840 | ], 841 | "authors": [ 842 | { 843 | "name": "Jordi Boggiano", 844 | "email": "j.boggiano@seld.be", 845 | "homepage": "http://seld.be", 846 | "role": "Developer" 847 | } 848 | ], 849 | "description": "Sends your logs to files, sockets, inboxes, databases and various web services", 850 | "homepage": "http://github.com/Seldaek/monolog", 851 | "keywords": [ 852 | "log", 853 | "logging", 854 | "psr-3" 855 | ], 856 | "time": "2013-04-23 10:09:48" 857 | }, 858 | { 859 | "name": "natxet/CssMin", 860 | "version": "dev-master", 861 | "source": { 862 | "type": "git", 863 | "url": "https://github.com/natxet/CssMin.git", 864 | "reference": "9801e2a0de7ae252ca4f2b85542d75a82047a8b4" 865 | }, 866 | "dist": { 867 | "type": "zip", 868 | "url": "https://api.github.com/repos/natxet/CssMin/zipball/9801e2a0de7ae252ca4f2b85542d75a82047a8b4", 869 | "reference": "9801e2a0de7ae252ca4f2b85542d75a82047a8b4", 870 | "shasum": "" 871 | }, 872 | "require": { 873 | "php": ">=5.0" 874 | }, 875 | "type": "library", 876 | "autoload": { 877 | "psr-0": { 878 | "CssMin": "src/" 879 | } 880 | }, 881 | "notification-url": "https://packagist.org/downloads/", 882 | "license": [ 883 | "MIT" 884 | ], 885 | "authors": [ 886 | { 887 | "name": "Joe Scylla", 888 | "email": "joe.scylla@gmail.com", 889 | "homepage": "https://profiles.google.com/joe.scylla" 890 | } 891 | ], 892 | "description": "Minifying CSS", 893 | "homepage": "http://code.google.com/p/cssmin/", 894 | "keywords": [ 895 | "css", 896 | "minify" 897 | ], 898 | "time": "2013-03-15 18:47:32" 899 | }, 900 | { 901 | "name": "nick4fake/jsmin", 902 | "version": "dev-master", 903 | "source": { 904 | "type": "git", 905 | "url": "https://github.com/nick4fake/JsMin.git", 906 | "reference": "5136ef1e1e56ffb14622bb9d93362d930ff61690" 907 | }, 908 | "dist": { 909 | "type": "zip", 910 | "url": "https://api.github.com/repos/nick4fake/JsMin/zipball/5136ef1e1e56ffb14622bb9d93362d930ff61690", 911 | "reference": "5136ef1e1e56ffb14622bb9d93362d930ff61690", 912 | "shasum": "" 913 | }, 914 | "require": { 915 | "php": ">=5.3" 916 | }, 917 | "type": "library", 918 | "autoload": { 919 | "psr-0": { 920 | "JsMin": "" 921 | } 922 | }, 923 | "notification-url": "https://packagist.org/downloads/", 924 | "license": [ 925 | "MIT" 926 | ], 927 | "authors": [ 928 | { 929 | "name": "Douglas Crockford", 930 | "homepage": "http://www.crockford.com" 931 | }, 932 | { 933 | "name": "Bogdan Yurov", 934 | "email": "bogdan@yurov.me" 935 | } 936 | ], 937 | "description": "Library for minifying JavaScript files", 938 | "time": "2012-12-17 09:42:00" 939 | }, 940 | { 941 | "name": "psr/log", 942 | "version": "1.0.0", 943 | "source": { 944 | "type": "git", 945 | "url": "https://github.com/php-fig/log", 946 | "reference": "1.0.0" 947 | }, 948 | "dist": { 949 | "type": "zip", 950 | "url": "https://github.com/php-fig/log/archive/1.0.0.zip", 951 | "reference": "1.0.0", 952 | "shasum": "" 953 | }, 954 | "type": "library", 955 | "autoload": { 956 | "psr-0": { 957 | "Psr\\Log\\": "" 958 | } 959 | }, 960 | "notification-url": "https://packagist.org/downloads/", 961 | "license": [ 962 | "MIT" 963 | ], 964 | "authors": [ 965 | { 966 | "name": "PHP-FIG", 967 | "homepage": "http://www.php-fig.org/" 968 | } 969 | ], 970 | "description": "Common interface for logging libraries", 971 | "keywords": [ 972 | "log", 973 | "psr", 974 | "psr-3" 975 | ], 976 | "time": "2012-12-21 11:40:51" 977 | }, 978 | { 979 | "name": "sensio/distribution-bundle", 980 | "version": "v2.2.1", 981 | "target-dir": "Sensio/Bundle/DistributionBundle", 982 | "source": { 983 | "type": "git", 984 | "url": "https://github.com/sensio/SensioDistributionBundle.git", 985 | "reference": "v2.2.1" 986 | }, 987 | "dist": { 988 | "type": "zip", 989 | "url": "https://api.github.com/repos/sensio/SensioDistributionBundle/zipball/v2.2.1", 990 | "reference": "v2.2.1", 991 | "shasum": "" 992 | }, 993 | "require": { 994 | "symfony/framework-bundle": ">=2.2,<3.0" 995 | }, 996 | "type": "symfony-bundle", 997 | "extra": { 998 | "branch-alias": { 999 | "dev-master": "2.2.x-dev" 1000 | } 1001 | }, 1002 | "autoload": { 1003 | "psr-0": { 1004 | "Sensio\\Bundle\\DistributionBundle": "" 1005 | } 1006 | }, 1007 | "notification-url": "https://packagist.org/downloads/", 1008 | "license": [ 1009 | "MIT" 1010 | ], 1011 | "authors": [ 1012 | { 1013 | "name": "Fabien Potencier", 1014 | "email": "fabien@symfony.com" 1015 | } 1016 | ], 1017 | "description": "The base bundle for the Symfony Distributions", 1018 | "keywords": [ 1019 | "configuration", 1020 | "distribution" 1021 | ], 1022 | "time": "2013-03-26 08:24:36" 1023 | }, 1024 | { 1025 | "name": "sensio/framework-extra-bundle", 1026 | "version": "v2.2.1", 1027 | "target-dir": "Sensio/Bundle/FrameworkExtraBundle", 1028 | "source": { 1029 | "type": "git", 1030 | "url": "https://github.com/sensio/SensioFrameworkExtraBundle.git", 1031 | "reference": "v2.2.1" 1032 | }, 1033 | "dist": { 1034 | "type": "zip", 1035 | "url": "https://api.github.com/repos/sensio/SensioFrameworkExtraBundle/zipball/v2.2.1", 1036 | "reference": "v2.2.1", 1037 | "shasum": "" 1038 | }, 1039 | "require": { 1040 | "doctrine/common": ">=2.2,<3.0", 1041 | "symfony/framework-bundle": ">=2.2,<3.0" 1042 | }, 1043 | "type": "symfony-bundle", 1044 | "extra": { 1045 | "branch-alias": { 1046 | "dev-master": "2.2.x-dev" 1047 | } 1048 | }, 1049 | "autoload": { 1050 | "psr-0": { 1051 | "Sensio\\Bundle\\FrameworkExtraBundle": "" 1052 | } 1053 | }, 1054 | "notification-url": "https://packagist.org/downloads/", 1055 | "license": [ 1056 | "MIT" 1057 | ], 1058 | "authors": [ 1059 | { 1060 | "name": "Fabien Potencier", 1061 | "email": "fabien@symfony.com" 1062 | } 1063 | ], 1064 | "description": "This bundle provides a way to configure your controllers with annotations", 1065 | "keywords": [ 1066 | "annotations", 1067 | "controllers" 1068 | ], 1069 | "time": "2013-03-21 16:41:54" 1070 | }, 1071 | { 1072 | "name": "symfony/assetic-bundle", 1073 | "version": "v2.1.2", 1074 | "target-dir": "Symfony/Bundle/AsseticBundle", 1075 | "source": { 1076 | "type": "git", 1077 | "url": "https://github.com/symfony/AsseticBundle.git", 1078 | "reference": "v2.1.2" 1079 | }, 1080 | "dist": { 1081 | "type": "zip", 1082 | "url": "https://api.github.com/repos/symfony/AsseticBundle/zipball/v2.1.2", 1083 | "reference": "v2.1.2", 1084 | "shasum": "" 1085 | }, 1086 | "require": { 1087 | "kriswallsmith/assetic": "1.1.*", 1088 | "php": ">=5.3.0", 1089 | "symfony/framework-bundle": ">=2.1.0,<2.3-dev" 1090 | }, 1091 | "require-dev": { 1092 | "symfony/class-loader": ">=2.1.0,<2.3-dev", 1093 | "symfony/console": ">=2.1.0,<2.3-dev", 1094 | "symfony/css-selector": ">=2.1.0,<2.3-dev", 1095 | "symfony/dom-crawler": ">=2.1.0,<2.3-dev", 1096 | "symfony/form": ">=2.1.0,<2.3-dev", 1097 | "symfony/twig-bundle": ">=2.1.0,<2.3-dev", 1098 | "symfony/yaml": ">=2.1.0,<2.3-dev" 1099 | }, 1100 | "suggest": { 1101 | "symfony/twig-bundle": ">=2.1.0,<2.3-dev" 1102 | }, 1103 | "type": "symfony-bundle", 1104 | "extra": { 1105 | "branch-alias": { 1106 | "dev-master": "2.1.x-dev" 1107 | } 1108 | }, 1109 | "autoload": { 1110 | "psr-0": { 1111 | "Symfony\\Bundle\\AsseticBundle": "" 1112 | } 1113 | }, 1114 | "notification-url": "https://packagist.org/downloads/", 1115 | "license": [ 1116 | "MIT" 1117 | ], 1118 | "authors": [ 1119 | { 1120 | "name": "Kris Wallsmith", 1121 | "email": "kris.wallsmith@gmail.com", 1122 | "homepage": "http://kriswallsmith.net/" 1123 | } 1124 | ], 1125 | "description": "Integrates Assetic into Symfony2", 1126 | "homepage": "https://github.com/symfony/AsseticBundle", 1127 | "keywords": [ 1128 | "assets", 1129 | "compression", 1130 | "minification" 1131 | ], 1132 | "time": "2013-02-23 22:29:21" 1133 | }, 1134 | { 1135 | "name": "symfony/monolog-bundle", 1136 | "version": "v2.2.0", 1137 | "target-dir": "Symfony/Bundle/MonologBundle", 1138 | "source": { 1139 | "type": "git", 1140 | "url": "https://github.com/symfony/MonologBundle.git", 1141 | "reference": "v2.2.0" 1142 | }, 1143 | "dist": { 1144 | "type": "zip", 1145 | "url": "https://api.github.com/repos/symfony/MonologBundle/zipball/v2.2.0", 1146 | "reference": "v2.2.0", 1147 | "shasum": "" 1148 | }, 1149 | "require": { 1150 | "monolog/monolog": ">=1.3,<2.0", 1151 | "php": ">=5.3.2", 1152 | "symfony/config": ">=2.2-beta2,<3.0", 1153 | "symfony/dependency-injection": ">=2.2-beta2,<3.0", 1154 | "symfony/monolog-bridge": ">=2.2-beta2,<3.0" 1155 | }, 1156 | "require-dev": { 1157 | "symfony/yaml": ">=2.2-beta2,<3.0" 1158 | }, 1159 | "type": "symfony-bundle", 1160 | "extra": { 1161 | "branch-alias": { 1162 | "dev-master": "2.2.x-dev" 1163 | } 1164 | }, 1165 | "autoload": { 1166 | "psr-0": { 1167 | "Symfony\\Bundle\\MonologBundle": "" 1168 | } 1169 | }, 1170 | "notification-url": "https://packagist.org/downloads/", 1171 | "license": [ 1172 | "MIT" 1173 | ], 1174 | "authors": [ 1175 | { 1176 | "name": "Fabien Potencier", 1177 | "email": "fabien@symfony.com" 1178 | }, 1179 | { 1180 | "name": "Symfony Community", 1181 | "homepage": "http://symfony.com/contributors" 1182 | } 1183 | ], 1184 | "description": "Symfony MonologBundle", 1185 | "homepage": "http://symfony.com", 1186 | "keywords": [ 1187 | "log", 1188 | "logging" 1189 | ], 1190 | "time": "2013-02-23 17:18:24" 1191 | }, 1192 | { 1193 | "name": "symfony/symfony", 1194 | "version": "v2.2.1", 1195 | "source": { 1196 | "type": "git", 1197 | "url": "https://github.com/symfony/symfony.git", 1198 | "reference": "v2.2.1" 1199 | }, 1200 | "dist": { 1201 | "type": "zip", 1202 | "url": "https://api.github.com/repos/symfony/symfony/zipball/v2.2.1", 1203 | "reference": "v2.2.1", 1204 | "shasum": "" 1205 | }, 1206 | "require": { 1207 | "doctrine/common": ">=2.2,<3.0", 1208 | "php": ">=5.3.3", 1209 | "psr/log": ">=1.0,<2.0", 1210 | "twig/twig": ">=1.11.0,<2.0" 1211 | }, 1212 | "replace": { 1213 | "symfony/browser-kit": "self.version", 1214 | "symfony/class-loader": "self.version", 1215 | "symfony/config": "self.version", 1216 | "symfony/console": "self.version", 1217 | "symfony/css-selector": "self.version", 1218 | "symfony/dependency-injection": "self.version", 1219 | "symfony/doctrine-bridge": "self.version", 1220 | "symfony/dom-crawler": "self.version", 1221 | "symfony/event-dispatcher": "self.version", 1222 | "symfony/filesystem": "self.version", 1223 | "symfony/finder": "self.version", 1224 | "symfony/form": "self.version", 1225 | "symfony/framework-bundle": "self.version", 1226 | "symfony/http-foundation": "self.version", 1227 | "symfony/http-kernel": "self.version", 1228 | "symfony/locale": "self.version", 1229 | "symfony/monolog-bridge": "self.version", 1230 | "symfony/options-resolver": "self.version", 1231 | "symfony/process": "self.version", 1232 | "symfony/propel1-bridge": "self.version", 1233 | "symfony/property-access": "self.version", 1234 | "symfony/routing": "self.version", 1235 | "symfony/security": "self.version", 1236 | "symfony/security-bundle": "self.version", 1237 | "symfony/serializer": "self.version", 1238 | "symfony/stopwatch": "self.version", 1239 | "symfony/swiftmailer-bridge": "self.version", 1240 | "symfony/templating": "self.version", 1241 | "symfony/translation": "self.version", 1242 | "symfony/twig-bridge": "self.version", 1243 | "symfony/twig-bundle": "self.version", 1244 | "symfony/validator": "self.version", 1245 | "symfony/web-profiler-bundle": "self.version", 1246 | "symfony/yaml": "self.version" 1247 | }, 1248 | "require-dev": { 1249 | "doctrine/data-fixtures": "1.0.*", 1250 | "doctrine/dbal": ">=2.2,<3.0", 1251 | "doctrine/orm": ">=2.2,<3.0,>=2.2.3", 1252 | "monolog/monolog": ">=1.3,<2.0", 1253 | "propel/propel1": "1.6.*" 1254 | }, 1255 | "type": "library", 1256 | "extra": { 1257 | "branch-alias": { 1258 | "dev-master": "2.2-dev" 1259 | } 1260 | }, 1261 | "autoload": { 1262 | "psr-0": { 1263 | "Symfony\\": "src/" 1264 | }, 1265 | "classmap": [ 1266 | "src/Symfony/Component/HttpFoundation/Resources/stubs", 1267 | "src/Symfony/Component/Locale/Resources/stubs" 1268 | ] 1269 | }, 1270 | "notification-url": "https://packagist.org/downloads/", 1271 | "license": [ 1272 | "MIT" 1273 | ], 1274 | "authors": [ 1275 | { 1276 | "name": "Fabien Potencier", 1277 | "email": "fabien@symfony.com" 1278 | }, 1279 | { 1280 | "name": "Symfony Community", 1281 | "homepage": "http://symfony.com/contributors" 1282 | } 1283 | ], 1284 | "description": "The Symfony PHP framework", 1285 | "homepage": "http://symfony.com", 1286 | "keywords": [ 1287 | "framework" 1288 | ], 1289 | "time": "2013-04-06 10:16:33" 1290 | }, 1291 | { 1292 | "name": "twig/extensions", 1293 | "version": "v1.0.0", 1294 | "source": { 1295 | "type": "git", 1296 | "url": "https://github.com/fabpot/Twig-extensions.git", 1297 | "reference": "v1.0.0" 1298 | }, 1299 | "dist": { 1300 | "type": "zip", 1301 | "url": "https://api.github.com/repos/fabpot/Twig-extensions/zipball/v1.0.0", 1302 | "reference": "v1.0.0", 1303 | "shasum": "" 1304 | }, 1305 | "require": { 1306 | "twig/twig": "1.*" 1307 | }, 1308 | "type": "library", 1309 | "extra": { 1310 | "branch-alias": { 1311 | "dev-master": "1.0.x-dev" 1312 | } 1313 | }, 1314 | "autoload": { 1315 | "psr-0": { 1316 | "Twig_Extensions_": "lib/" 1317 | } 1318 | }, 1319 | "notification-url": "https://packagist.org/downloads/", 1320 | "license": [ 1321 | "MIT" 1322 | ], 1323 | "authors": [ 1324 | { 1325 | "name": "Fabien Potencier", 1326 | "email": "fabien@symfony.com" 1327 | } 1328 | ], 1329 | "description": "Common additional features for Twig that do not directly belong in core", 1330 | "homepage": "https://github.com/fabpot/Twig-extensions", 1331 | "keywords": [ 1332 | "debug", 1333 | "i18n", 1334 | "text" 1335 | ], 1336 | "time": "2013-02-28 14:21:30" 1337 | }, 1338 | { 1339 | "name": "twig/twig", 1340 | "version": "v1.12.3", 1341 | "source": { 1342 | "type": "git", 1343 | "url": "https://github.com/fabpot/Twig.git", 1344 | "reference": "v1.12.3" 1345 | }, 1346 | "dist": { 1347 | "type": "zip", 1348 | "url": "https://api.github.com/repos/fabpot/Twig/zipball/v1.12.3", 1349 | "reference": "v1.12.3", 1350 | "shasum": "" 1351 | }, 1352 | "require": { 1353 | "php": ">=5.2.4" 1354 | }, 1355 | "type": "library", 1356 | "extra": { 1357 | "branch-alias": { 1358 | "dev-master": "1.12-dev" 1359 | } 1360 | }, 1361 | "autoload": { 1362 | "psr-0": { 1363 | "Twig_": "lib/" 1364 | } 1365 | }, 1366 | "notification-url": "https://packagist.org/downloads/", 1367 | "license": [ 1368 | "BSD-3" 1369 | ], 1370 | "authors": [ 1371 | { 1372 | "name": "Fabien Potencier", 1373 | "email": "fabien@symfony.com" 1374 | }, 1375 | { 1376 | "name": "Armin Ronacher", 1377 | "email": "armin.ronacher@active-4.com" 1378 | } 1379 | ], 1380 | "description": "Twig, the flexible, fast, and secure template language for PHP", 1381 | "homepage": "http://twig.sensiolabs.org", 1382 | "keywords": [ 1383 | "templating" 1384 | ], 1385 | "time": "2013-04-08 12:40:11" 1386 | } 1387 | ], 1388 | "packages-dev": [ 1389 | 1390 | ], 1391 | "aliases": [ 1392 | 1393 | ], 1394 | "minimum-stability": "alpha", 1395 | "stability-flags": { 1396 | "brunschgi/terrific-core-bundle": 20, 1397 | "brunschgi/terrific-composer-bundle": 20, 1398 | "leafo/lessphp": 20, 1399 | "nick4fake/jsmin": 20, 1400 | "natxet/cssmin": 20 1401 | }, 1402 | "platform": { 1403 | "php": ">=5.3.3" 1404 | }, 1405 | "platform-dev": [ 1406 | 1407 | ] 1408 | } 1409 | -------------------------------------------------------------------------------- /src/.htaccess: -------------------------------------------------------------------------------- 1 | deny from all -------------------------------------------------------------------------------- /src/Terrific/Composition/Controller/DefaultController.php: -------------------------------------------------------------------------------- 1 | namespace = filename (eg. forms) 4 | {% macro input(name, value, type, size) %} 5 | 6 | {% endmacro %} 7 | #} 8 | -------------------------------------------------------------------------------- /src/Terrific/Composition/Resources/public/css/elements.less: -------------------------------------------------------------------------------- 1 | /* Here comes your general styles */ 2 | body { 3 | font-family: Constantia, "Lucida Bright", Lucidabright, "Lucida Serif", Lucida, "DejaVu Serif", "Bitstream Vera Serif", "Liberation Serif", Georgia, serif; 4 | color: #000; 5 | } 6 | 7 | /* Indentations */ 8 | .page { 9 | margin-bottom: 3em; 10 | } 11 | 12 | .block { 13 | margin-top: 2em; 14 | padding-top: 1em; 15 | border-top: 7px solid #222; 16 | } 17 | 18 | /* Headings */ 19 | .h3 { 20 | font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; 21 | font-size: 24 / 16em; 22 | line-height: 30 / 24em; 23 | margin: 2em 0 1em 0; 24 | padding-top: 2em; 25 | border-top: 7px solid #222; 26 | } 27 | 28 | /* Text Blocks */ 29 | p.base { 30 | font-size: 18 / 16em; 31 | line-height: 24 / 18em; 32 | } 33 | 34 | .spread { 35 | width: 31em; 36 | } 37 | 38 | /* Highlightings */ 39 | em.base { 40 | font-family: monospace; 41 | white-space: nowrap; 42 | padding: 0 0.2em; 43 | color: #74AE00; 44 | } 45 | 46 | /* Links */ 47 | a.base { 48 | display: inline-block; 49 | padding: 0 0.25em; 50 | color: #74AE00; 51 | background: transparent; 52 | text-decoration: none; 53 | } 54 | 55 | a.base:visited { 56 | background: #7F7F7F; 57 | color: #fff 58 | } 59 | 60 | a.base:hover, a.base:active { 61 | background: #74AE00; 62 | color: #fff; 63 | } 64 | 65 | /* Lists */ 66 | ol.base { 67 | li { 68 | padding-left: 30px; 69 | font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; 70 | font-size: 20 / 16em; 71 | line-height: 1.2em; 72 | min-height: 70 / 24em; 73 | padding-top: 20px; 74 | } 75 | 76 | li:before { 77 | clear: left; 78 | font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; 79 | font-size: 24 / 16em; 80 | line-height: 1.5em; 81 | height: 48px; 82 | width: 48px; 83 | display: block; 84 | float: left; 85 | text-align: center; 86 | -moz-border-radius: 48px; 87 | -webkit-border-radius: 48px; 88 | -ms-border-radius: 48px; 89 | -o-border-radius: 48px; 90 | border-radius: 48px; 91 | background: #222; 92 | margin-right: 0.4em; 93 | font-weight: 700; 94 | color: white; 95 | position: relative; 96 | top: -12px; 97 | } 98 | 99 | .first:before { 100 | content: '1'; 101 | } 102 | 103 | .second:before { 104 | content: '2'; 105 | } 106 | .third:before { 107 | content: '3'; 108 | } 109 | } -------------------------------------------------------------------------------- /src/Terrific/Composition/Resources/public/css/grid.less: -------------------------------------------------------------------------------- 1 | /* reduced set of OOCSS rules */ 2 | .page{margin:0 auto;width:960px;_text-align:left;} 3 | .main{overflow: hidden;_overflow:visible;_zoom:1;} 4 | 5 | .bd {overflow:hidden; *overflow:visible; zoom:1;} 6 | 7 | .media {overflow:hidden;*overflow:visible;zoom:1;} 8 | .media .left{display: block; float:left;} 9 | .media .right{display: block; float:right;} 10 | 11 | .line,.last-unit{overflow:hidden; *overflow:visible;*zoom:1;} 12 | .unit{float:left;} 13 | .size1of3{width:33.33333%;} 14 | .size2of3{width:66.66666%;} 15 | .last-unit{float:none;width:auto;_position:relative;_left:-3px;_margin-right:-3px;} -------------------------------------------------------------------------------- /src/Terrific/Composition/Resources/public/css/reset.less: -------------------------------------------------------------------------------- 1 | /* 2 | YUI 3.4.1 (build 4118) 3 | Copyright 2011 Yahoo! Inc. All rights reserved. 4 | Licensed under the BSD License. 5 | http://yuilibrary.com/license/ 6 | */ 7 | html{color:#000;background:#FFF}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0}table{border-collapse:collapse;border-spacing:0}fieldset,img{border:0}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal}ol,ul{list-style:none}caption,th{text-align:left}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal}q:before,q:after{content:''}abbr,acronym{border:0;font-variant:normal}sup{vertical-align:text-top}sub{vertical-align:text-bottom}input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit}input,textarea,select{*font-size:100%}legend{color:#000} -------------------------------------------------------------------------------- /src/Terrific/Composition/Resources/views/Default/index.html.twig: -------------------------------------------------------------------------------- 1 | {% extends 'TerrificComposition::base.html.twig' %} 2 | 3 | {% block title %}Terrific Composer - Welcome{% endblock %} 4 | 5 | {% block body %} 6 |
7 | {{ tc.module('Intro') }} 8 |
    9 |
  1. Open /src/Terrific/Composition/Resources/views/Default/index.html.twig in your editor
  2. 10 |
  3. Have a look at the comments there
  4. 11 |
  5. Play around with Mr. Terrific and his friends
  6. 12 |
13 |
14 |
15 | {{ tc.module('Hero', 'mrterrific')}} 16 |
17 |
18 | {{ tc.module('Teaser', 'decorate')}} 19 |
20 |
21 | {{ tc.module('Hero', 'mrterrific', [ 'Stealth' ])}} 22 |
23 |
24 |

Get more Superheroes with different templates

25 |

The 2nd param of the tc.module(..) macro allows you to have different templates for the same module.

26 |
27 |
28 | {{ tc.module('Hero', 'mrterrific')}} 29 |
30 |
31 | {{ tc.module('Hero', 'batman')}} 32 |
33 |
34 | {{ tc.module('Hero', 'spiderman')}} 35 |
36 |
37 |

Let them talk with each other

38 |

Modules are able to communicate with each other by using connectors

39 |
40 |
41 | {{ tc.module('Hero', 'mrterrific', ['Stealth'], ['1'])}} 42 |
43 |
44 | {{ tc.module('Hero', 'batman', ['Stealth'], ['1'])}} 45 |
46 |
47 | {{ tc.module('Hero', 'spiderman', ['Stealth'], ['1'])}} 48 |
49 |
50 |
51 | {% endblock %} 52 | -------------------------------------------------------------------------------- /src/Terrific/Composition/Resources/views/base.html.twig: -------------------------------------------------------------------------------- 1 | {% extends 'TerrificCoreBundle::base.html.twig' %} 2 | 3 | {% block title %}Terrific Composer{% endblock %} 4 | 5 | {% block styles %} 6 | {% stylesheets 7 | '@TerrificComposition/Resources/public/css/reset.less' 8 | '@TerrificComposition/Resources/public/css/grid.less' 9 | '@TerrificComposition/Resources/public/css/elements.less' 10 | output="css/compiled/project.css" 11 | %} 12 | 13 | {% endstylesheets %} 14 | 15 | {# styles from parent (terrific core) layout #} 16 | {{ parent() }} 17 | {% endblock %} 18 | 19 | {% block scripts %} 20 | {# here comes your scripts 21 | {% javascripts 22 | '@TerrificComposition/Resources/public/js/*.*' 23 | output='js/compiled/statics.js' 24 | %} 25 | 26 | {% endjavascripts %} 27 | #} 28 | 29 | {# scripts from parent (terrific core) layout #} 30 | {{ parent() }} 31 | {% endblock %} 32 | 33 | {# set the body class -> e.g. global module #} 34 | {% block body_class %}{% endblock %} 35 | 36 | {# content that is the same on every page (ie. logo) goes into composition #} 37 | {% block composition %} 38 | 39 | {# your page content goes into body #} 40 | {% block body %} 41 | {% endblock %} 42 | 43 | {% endblock %} 44 | 45 | {# terrificjs bootstrap #} 46 | {% block bootstrap %} 47 | 64 | {% endblock %} 65 | -------------------------------------------------------------------------------- /src/Terrific/Composition/TerrificComposition.php: -------------------------------------------------------------------------------- 1 | () 18 | */ 19 | this.on = function (callback) { 20 | var self = this, 21 | $ctx = this.$ctx; 22 | 23 | // create mode chooser markup 24 | $ctx.append($('

Stealth Mode

onoff
')); 25 | 26 | // binding the stealth mode on / off events 27 | $('.on', $ctx).bind('click', function () { 28 | self.activateStealthMode(); 29 | return false; 30 | }); 31 | 32 | $('.off', $ctx).bind('click', function () { 33 | self.deactivateStealthMode(); 34 | return false; 35 | }); 36 | 37 | // calling parent method 38 | parent.on(callback); 39 | }; 40 | 41 | this.activateStealthMode = function () { 42 | var self = this, 43 | $hero = $('pre', this.$ctx); 44 | 45 | $hero.hide(100).show(100).hide(100).show(100).animate({ opacity:0.2 }, 500, function () { 46 | $hero.show(200).hide(200).show(200).hide(200); 47 | }); 48 | }; 49 | 50 | this.deactivateStealthMode = function () { 51 | var self = this, 52 | $hero = $('pre', this.$ctx); 53 | 54 | $hero.show(200).hide(200).show(200).animate({ opacity:1 }, 500, function () { 55 | $hero.hide(100).show(100).hide(100).show(100); 56 | }); 57 | }; 58 | }; 59 | })(Tc.$); 60 | -------------------------------------------------------------------------------- /src/Terrific/Module/Hero/Resources/views/batman.html.twig: -------------------------------------------------------------------------------- 1 |
 2 |                                  :.     .:
 3 |                              : ##D      ,##G
 4 |                            .##              .#,:
 5 |                          .jW                   #
 6 |                         :#                      .E
 7 |                        :#                         #
 8 |                        #                           G
 9 |                                                    f
10 |                       #                             #
11 |                      :K                             K:
12 |                       .
13 | 
14 |                      :L
15 |                       #                             .
16 |                       :                             #.
17 |                       ,#                            t
18 |                         #                          #,
19 |                          #                        #
20 |                           #                      #
21 |                           :WL                   #:
22 |                             ,                G#
23 |                            :#    ##;     j##,
24 |                            f   #.,:.      ,
25 |                            D #:,
26 |                          :## ,
27 |                          G
28 |                      t
29 |                      GWW
30 |                      GDWL
31 |                      LWWK
32 |                      iWWG
33 |                      KK:G
34 |                     W##E
35 |                  jLfG#W#W
36 |                 fijLtjjijt
37 |                 ;ffLfjEKtjjt
38 |                .LLLDLfjfEWfL
39 |               ;ffLDLLfLGLLjG
40 |               :LDLiLLffLfjiGt
41 |               fGLG#jfDfGDGtLG
42 |              LfGL##tLLGGGLfLLj
43 |              WfLW###jLGDEE t:WW K#E
44 |             L#KWW##WjLDDGL  tWKEWW
45 |             D#WWW## ifffWL,   #WW
46 |             EWWWW## GDGLjjD   Wj
47 |             WW WW##EWfLL#DW
48 |             #W WW## tW####i
49 |             W# WW##,iGW###G
50 |             ## WW# ;tGG#WDL
51 |            D# jW##:tjGDEDDDj
52 |            #W WW#WjLDDWGDDGt
53 |             ; W## jGGG#LEEGt
54 |              DW##:GGDG#LEDGD
55 |              WW##LDDD###EDDf
56 |             tW###LDGG###fDDW
57 |             WW###EDE###WLELW
58 |            WW### LGD##W##EDK
59 |            WW###:LDW#WW#;DD;
60 |           WWW##.fDD##WW#iDGK
61 |           WK###GGDG##WW#tDDK
62 |           WW###D#W###W##WKW#
63 |          #WW###K#####W## ###
64 |          #W### #### #  # W##
65 |          #W ## ##   W     KW
66 |          #  # KWW   W     K#W
67 |          #  # E#          KWW#
68 |             . DW          WW#WW#
69 |               KK          fffWWW
70 |               WD          jji,.
71 |              DWE          .
72 |              GWD
73 |              W#Ki
74 |                 
75 |
76 |
77 | 78 | 79 |
-------------------------------------------------------------------------------- /src/Terrific/Module/Hero/Resources/views/mrterrific.html.twig: -------------------------------------------------------------------------------- 1 |
 2 |                                  :.     .:
 3 |                              : ##D      ,##G
 4 |                            .##              .#,:
 5 |                          .jW                   #
 6 |                         :#                      .E
 7 |                        :#                         #
 8 |                        #                           G
 9 |                                                    f
10 |                       #                             #
11 |                      :K                             K:
12 |                       .
13 | 
14 |                      :L
15 |                       #                             .
16 |                       :                             #.
17 |                       ,#                            t
18 |                         #                          #,
19 |                          #                        #
20 |                           #                      #
21 |                           :WL                   #:
22 |                             ,                G#
23 |                            :#    ##;     j##,
24 |                            f   #.,:.      ,
25 |                            D #:,
26 |                          :## ,
27 |                          G
28 |               ;G   i.
29 |              DGKK  t
30 |              DKWW  f;
31 |              D#K  tKt
32 |              G,,, t;f
33 |             ,G;D    L,
34 |             EGWD    ;::
35 |         LLGGGGDGLLL.:;:D
36 |        GfGDLLKGGKGGLGfWG
37 |       fLEDEGLGGDGLLDKWLLf
38 |      LLLEEGLLLLGGGLEKKDDD
39 |     DLLLDDDGGLLLGGDKDDWEE
40 |     LLDGDWDWEGLEDGK iWW.
41 |    LEEK  WKGfL:::GG
42 |    EDDLK WEKKL:.:;G
43 |     WWEDE KEEL::::K
44 |      WWW.i,WWWELDLE
45 |       i.:j:WWWEGDLE
46 |       t:;tiWWKKGDfG
47 |       i   WWWKDDKGG
48 |          jWDDEEDEGG
49 |          WDDDEDDGGLf
50 |          EDEGGDDGGGG
51 |          DDDDDGDWGGG
52 |          DDDDDDEWDGGE
53 |          WEK#WWWKWGG
54 |          DDDDDK#DKDD
55 |          DKDDD.KDDDD
56 |          DKDDK  DDDG
57 |         .DDDD.  WDDE
58 |         :DDD.   .DDD
59 |         DDDD     DDW
60 |        #DDD      DDD
61 |        DDDE     .GDD
62 |        DDDD      DDD
63 |       .DDDK      KDD
64 |        EKDL      KDD
65 |        EDD        DD
66 |        WDG        EDj
67 |        ;DD        f:;
68 |        jti         i.
69 |         ,.         WWE
70 |        WWL         GKWKK
71 |        KWf#          LWW
72 |         WWtD
73 |          WWK
74 |         
75 |
76 |
77 | 78 | 79 |
-------------------------------------------------------------------------------- /src/Terrific/Module/Hero/Resources/views/spiderman.html.twig: -------------------------------------------------------------------------------- 1 |
 2 |                                  :.     .:
 3 |                              : ##D      ,##G
 4 |                            .##              .#,:
 5 |                          .jW                   #
 6 |                         :#                      .E
 7 |                        :#                         #
 8 |                        #                           G
 9 |                                                    f
10 |                       #                             #
11 |                      :K                             K:
12 |                       .
13 | 
14 |                      :L
15 |                       #                             .
16 |                       :                             #.
17 |                       ,#                            t
18 |                         #                          #,
19 |                          #                        #
20 |                           #                      #
21 |                           :WL                   #:
22 |                             ,                G#
23 |                            :#    ##;     j##,
24 |                            f   #.,:.      ,
25 |                            D #:,
26 |                          :## ,
27 |                          G
28 |                     E
29 |                  D  D D
30 |                  ,  G G
31 |                   E EK D
32 |                   EEGDK
33 |                   KDDDD
34 |                   DDDDE
35 |                 WKEDEDEEE.
36 |                      EEGEGE
37 |                       DDDEDD
38 |                        EtDEDDD.
39 |                        fLffDEDDD
40 |                          DDtDEEGt
41 |                           EjtKEDGED
42 |                            DfDEEDDDKEEEE:
43 |                             EEGDEEDEEGGDE.
44 |                              KLELDKEDGGGEK
45 |                               DjDEDDEEEEEE
46 |                     .fLLL;    WGKKWDEEEDEK,
47 |                     GLfffLG    KKWKEDDEEEKG
48 |                    .GLGLLLLD   fDW:EDDEEWDGD
49 |                     DDLLLDLLD  LGW.WKEK,KDDD
50 |                     WDLfLKGLGGjEEKWKW..WKEEEE
51 |                     jEDGLjKGLGGKEEKDEtKEKKKEW     :it,
52 |                      KKGGjfKGLLDKKKEEDEWKDGGK  ;LfLLGfL
53 |                      KKEDffEEGGKKWKDEEWDLiEfDtGLfGtLDfG;
54 |                      WKKDGLEDGGGKWWWWWWtjDfEELffGDLGDGD;
55 |                      EKKKEEEEEDGWDLWWWDffLEEELLGGLGKEDK:
56 |                       KWKKKEWKKELjEEDfLjfGfKKKGDLfDKEEG
57 |                        WKWKKEWWWKDEEEGLGtGEEKEELLLGKKK;
58 |                         KKWKKWGEKDjEDEfLDDEKKKWLLGDKKD
59 |                           KKKKLWKEEEtLGEEDEKWWEGDDKKKD
60 |                            WKDEWKWEGEGDDEGKKWKEEGKKEKK
61 |                            KEDEWWKDDDELKEEKW. EWDKKKE
62 |                            DDEEWWDDDWLEDEKK  EKDKKKK
63 |                            EDEWWKGDDDLELEGE tKKWWWK
64 |                            KEEKWEEEWEGKEEDEGfffKK
65 |                             EfEWWWWKDEWEKWKDDDED
66 |                             EDEWKKWEDEWK WKKWK:
67 |                             EDEWWKWEE.  #KKW#
68 |                             EEj WKKKf  WKKWW
69 |                             .   .      KKWW
70 |                                       jKWWK
71 |                                       WKKK
72 | 
73 |
74 |
75 | 76 | 77 |
-------------------------------------------------------------------------------- /src/Terrific/Module/Hero/TerrificModuleHero.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Terrific\Module\Hero; 13 | 14 | use Symfony\Component\HttpKernel\Bundle\Bundle; 15 | 16 | class TerrificModuleHero extends Bundle 17 | { 18 | } 19 | -------------------------------------------------------------------------------- /src/Terrific/Module/Intro/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brunschgi/terrific-composer/4696209c70274e976c07d428b1649699147d55a5/src/Terrific/Module/Intro/README.md -------------------------------------------------------------------------------- /src/Terrific/Module/Intro/Resources/public/css/Intro.less: -------------------------------------------------------------------------------- 1 | /* @group Module: Intro */ 2 | @media screen { 3 | .mod-intro { 4 | overflow: hidden; 5 | 6 | .bubble { 7 | position: relative; 8 | float: left; 9 | padding: 13 / 16em; 10 | margin: 1em 0.15384615em 1.5em; 11 | background: #74AE00; 12 | color: #fff; 13 | font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; 14 | font-size: 1.875em; 15 | line-height: 1em; 16 | font-weight: lighter; 17 | text-transform: uppercase; 18 | letter-spacing: 0.07em; 19 | 20 | .arrow { 21 | position: absolute; 22 | left: -0.8125em; 23 | bottom: -19px; 24 | font-size: 0pt; 25 | height: 0; 26 | width: 0; 27 | border: 20px solid transparent; 28 | border-left-color: #74AE00; 29 | } 30 | } 31 | 32 | img { 33 | display: block; 34 | float: left; 35 | padding-top: 2.5em; 36 | } 37 | 38 | .emphasize { 39 | font-weight: bolder; 40 | letter-spacing: 0.04em; 41 | } 42 | } 43 | } 44 | /* @end */ 45 | -------------------------------------------------------------------------------- /src/Terrific/Module/Intro/Resources/public/img/einstein.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brunschgi/terrific-composer/4696209c70274e976c07d428b1649699147d55a5/src/Terrific/Module/Intro/Resources/public/img/einstein.png -------------------------------------------------------------------------------- /src/Terrific/Module/Intro/Resources/public/js/Tc.Module.Intro.js: -------------------------------------------------------------------------------- 1 | (function ($) { 2 | 3 | "use strict"; 4 | 5 | /** 6 | * Intro module implementation. 7 | * 8 | * @author Terrific Composer 9 | * @namespace Tc.Module 10 | * @class Intro 11 | * @extends Tc.Module 12 | */ 13 | Tc.Module.Intro = Tc.Module.extend({ 14 | 15 | /** 16 | * Initializes the Intro module. 17 | * 18 | * @method init 19 | * @return {void} 20 | * @constructor 21 | * @param {jQuery} $ctx the jquery context 22 | * @param {Sandbox} sandbox the sandbox to get the resources from 23 | * @param {Number} id the unique module id 24 | */ 25 | init:function ($ctx, sandbox, id) { 26 | // call base constructor 27 | this._super($ctx, sandbox, id); 28 | }, 29 | 30 | /** 31 | * Hook function to do all of your module stuff. 32 | * 33 | * @method on 34 | * @param {Function} callback function 35 | * @return void 36 | */ 37 | on:function (callback) { 38 | callback(); 39 | }, 40 | 41 | /** 42 | * Hook function to trigger your events. 43 | * 44 | * @method after 45 | * @return void 46 | */ 47 | after:function () { 48 | 49 | } 50 | }); 51 | })(Tc.$); 52 | -------------------------------------------------------------------------------- /src/Terrific/Module/Intro/Resources/views/intro.html.twig: -------------------------------------------------------------------------------- 1 | 2 |
Welcome to the
Terrific Composer
-------------------------------------------------------------------------------- /src/Terrific/Module/Intro/TerrificModuleIntro.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Terrific\Module\Intro; 13 | 14 | use Symfony\Component\HttpKernel\Bundle\Bundle; 15 | 16 | class TerrificModuleIntro extends Bundle 17 | { 18 | } 19 | -------------------------------------------------------------------------------- /src/Terrific/Module/Teaser/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brunschgi/terrific-composer/4696209c70274e976c07d428b1649699147d55a5/src/Terrific/Module/Teaser/README.md -------------------------------------------------------------------------------- /src/Terrific/Module/Teaser/Resources/public/css/Teaser.less: -------------------------------------------------------------------------------- 1 | /* @group Module: Teaser */ 2 | @media screen { 3 | .mod-teaser { 4 | overflow: hidden; 5 | 6 | .promo { 7 | margin: 0 0.9375em; 8 | text-align: center; 9 | } 10 | 11 | .h3 { 12 | padding-top: 0; 13 | border-top: none; 14 | margin: 1.25em 0 0.416666666em 0; 15 | } 16 | } 17 | } 18 | /* @end */ 19 | -------------------------------------------------------------------------------- /src/Terrific/Module/Teaser/Resources/public/img/transform.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brunschgi/terrific-composer/4696209c70274e976c07d428b1649699147d55a5/src/Terrific/Module/Teaser/Resources/public/img/transform.png -------------------------------------------------------------------------------- /src/Terrific/Module/Teaser/Resources/public/js/Tc.Module.Teaser.js: -------------------------------------------------------------------------------- 1 | (function ($) { 2 | 3 | "use strict"; 4 | 5 | /** 6 | * Teaser module implementation. 7 | * 8 | * @author Terrific Composer 9 | * @namespace Tc.Module 10 | * @class Teaser 11 | * @extends Tc.Module 12 | */ 13 | Tc.Module.Teaser = Tc.Module.extend({ 14 | 15 | /** 16 | * Initializes the Teaser module. 17 | * 18 | * @method init 19 | * @return {void} 20 | * @constructor 21 | * @param {jQuery} $ctx the jquery context 22 | * @param {Sandbox} sandbox the sandbox to get the resources from 23 | * @param {Number} id the unique module id 24 | */ 25 | init:function ($ctx, sandbox, id) { 26 | // call base constructor 27 | this._super($ctx, sandbox, id); 28 | }, 29 | 30 | /** 31 | * Hook function to do all of your module stuff. 32 | * 33 | * @method on 34 | * @param {Function} callback function 35 | * @return void 36 | */ 37 | on:function (callback) { 38 | callback(); 39 | }, 40 | 41 | /** 42 | * Hook function to trigger your events. 43 | * 44 | * @method after 45 | * @return void 46 | */ 47 | after:function () { 48 | 49 | } 50 | }); 51 | })(Tc.$); 52 | -------------------------------------------------------------------------------- /src/Terrific/Module/Teaser/Resources/views/decorate.html.twig: -------------------------------------------------------------------------------- 1 | 2 |
3 |

Add a Skin

4 | 5 |

6 | Decorate Mr. Terrific with
the stealth mode Skin 7 |

8 |
-------------------------------------------------------------------------------- /src/Terrific/Module/Teaser/TerrificModuleTeaser.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Terrific\Module\Teaser; 13 | 14 | use Symfony\Component\HttpKernel\Bundle\Bundle; 15 | 16 | class TerrificModuleTeaser extends Bundle 17 | { 18 | } 19 | -------------------------------------------------------------------------------- /web/.htaccess: -------------------------------------------------------------------------------- 1 | # Use the front controller as index file. It serves as fallback solution when 2 | # every other rewrite/redirect fails (e.g. in an aliased environment without 3 | # mod_rewrite). Additionally, this reduces the matching process for the 4 | # startpage (path "/") because otherwise Apache will apply the rewritting rules 5 | # to each configured DirectoryIndex file (e.g. index.php, index.html, index.pl). 6 | DirectoryIndex app.php 7 | 8 | 9 | RewriteEngine On 10 | 11 | # Redirect to URI without front controller to prevent duplicate content 12 | # (with and without `/app.php`). Only do this redirect on the initial 13 | # rewrite by Apache and not on subsequent cycles. Otherwise we would get an 14 | # endless redirect loop (request -> rewrite to front controller -> 15 | # redirect -> request -> ...). 16 | # So in case you get a "too many redirects" error or you always get redirected 17 | # to the startpage because your Apache does not expose the REDIRECT_STATUS 18 | # environment variable, you have 2 choices: 19 | # - disable this feature by commenting the following 2 lines or 20 | # - use Apache >= 2.3.9 and replace all L flags by END flags and remove the 21 | # following RewriteCond (best solution) 22 | RewriteCond %{ENV:REDIRECT_STATUS} ^$ 23 | RewriteRule ^app\.php(/(.*)|$) %{CONTEXT_PREFIX}/$2 [R=301,L] 24 | 25 | # If the requested filename exists, simply serve it. 26 | # We only want to let Apache serve files and not directories. 27 | RewriteCond %{REQUEST_FILENAME} -f 28 | RewriteRule .? - [L] 29 | 30 | # The following rewrites all other queries to the front controller. The 31 | # condition ensures that if you are using Apache aliases to do mass virtual 32 | # hosting, the base path will be prepended to allow proper resolution of the 33 | # app.php file; it will work in non-aliased environments as well, providing 34 | # a safe, one-size fits all solution. 35 | RewriteCond %{REQUEST_URI}::$1 ^(/.+)(.+)::\2$ 36 | RewriteRule ^(.*) - [E=BASE:%1] 37 | RewriteRule .? %{ENV:BASE}app.php [L] 38 | 39 | 40 | 41 | 42 | # When mod_rewrite is not available, we instruct a temporary redirect of 43 | # the startpage to the front controller explicitly so that the website 44 | # and the generated links can still be used. 45 | RedirectMatch 302 ^/$ /app.php/ 46 | # RedirectTemp cannot be used instead 47 | 48 | 49 | -------------------------------------------------------------------------------- /web/app.php: -------------------------------------------------------------------------------- 1 | register(true); 13 | */ 14 | 15 | require_once __DIR__ . '/../app/AppKernel.php'; 16 | //require_once __DIR__.'/../app/AppCache.php'; 17 | 18 | $kernel = new AppKernel('prod', false); 19 | $kernel->loadClassCache(); 20 | //$kernel = new AppCache($kernel); 21 | $request = Request::createFromGlobals(); 22 | $response = $kernel->handle($request); 23 | $response->send(); 24 | $kernel->terminate($request, $response); 25 | -------------------------------------------------------------------------------- /web/app_dev.php: -------------------------------------------------------------------------------- 1 | loadClassCache(); 24 | $request = Request::createFromGlobals(); 25 | $response = $kernel->handle($request); 26 | $response->send(); 27 | $kernel->terminate($request, $response); 28 | -------------------------------------------------------------------------------- /web/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brunschgi/terrific-composer/4696209c70274e976c07d428b1649699147d55a5/web/apple-touch-icon.png -------------------------------------------------------------------------------- /web/config.php: -------------------------------------------------------------------------------- 1 | getFailedRequirements(); 20 | $minorProblems = $symfonyRequirements->getFailedRecommendations(); 21 | 22 | ?> 23 | 24 | 25 | 26 | 27 | 28 | Symfony Configuration 29 | 30 | 31 | 32 | 33 | 34 |
35 |
36 | 39 | 40 | 60 |
61 | 62 |
63 |
64 |
65 |

Welcome!

66 |

Welcome to your new Symfony project.

67 |

68 | This script will guide you through the basic configuration of your project. 69 | You can also do the same by editing the ‘app/config/parameters.yml’ file directly. 70 |

71 | 72 | 73 |

Major problems

74 |

Major problems have been detected and must be fixed before continuing:

75 |
    76 | 77 |
  1. getHelpHtml() ?>
  2. 78 | 79 |
80 | 81 | 82 | 83 |

Recommendations

84 |

85 | Additionally, toTo enhance your Symfony experience, 86 | it’s recommended that you fix the following: 87 |

88 |
    89 | 90 |
  1. getHelpHtml() ?>
  2. 91 | 92 |
93 | 94 | 95 | hasPhpIniConfigIssue()): ?> 96 |

* 97 | getPhpIniConfigPath()): ?> 98 | Changes to the php.ini file must be done in "getPhpIniConfigPath() ?>". 99 | 100 | To change settings, create a "php.ini". 101 | 102 |

103 | 104 | 105 | 106 |

Your configuration looks good to run Symfony.

107 | 108 | 109 | 118 |
119 |
120 |
121 |
Symfony Standard Edition
122 |
123 | 124 | 125 | -------------------------------------------------------------------------------- /web/css/dependencies/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brunschgi/terrific-composer/4696209c70274e976c07d428b1649699147d55a5/web/css/dependencies/.gitkeep -------------------------------------------------------------------------------- /web/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brunschgi/terrific-composer/4696209c70274e976c07d428b1649699147d55a5/web/favicon.ico -------------------------------------------------------------------------------- /web/js/dependencies/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brunschgi/terrific-composer/4696209c70274e976c07d428b1649699147d55a5/web/js/dependencies/.gitkeep -------------------------------------------------------------------------------- /web/robots.txt: -------------------------------------------------------------------------------- 1 | # www.robotstxt.org/ 2 | # www.google.com/support/webmasters/bin/answer.py?hl=en&answer=156449 3 | 4 | User-agent: * 5 | --------------------------------------------------------------------------------