This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{template "layout" .}} | |
{{define `htmlAttrs`}} ng-app="myApp"{{end}} | |
{{define "headTitle"}}Contact us<!-- can't include "parent" like in Jinja/Twig so these "blocks" are not 100% flexible, but still usable -->{{end}} | |
{{define "headExtraScripts"}} | |
<!-- assuming this is not in an asset pipeline where it normally would be --> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script> | |
{{end}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// +build integration | |
package integration | |
import ( | |
"bytes" | |
"encoding/json" | |
"net/http" | |
"testing" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{ define "layout" }} | |
<html> | |
<body> | |
{{ template "navbar" . }} | |
<div class="content"> | |
{{ template "content" . }} | |
</div> | |
</body> | |
</html> | |
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Acme\Bundle\WebBundle\Controller; | |
use Symfony\Component\HttpFoundation\Request; | |
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; | |
use Symfony\Component\Routing\RouterInterface; | |
use Symfony\Component\Security\Core\SecurityContextInterface; | |
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
<?php | |
class NewMasterSlaveConnection | |
{ | |
public function beginTransaction() | |
{ | |
$this->connect('master'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Connection | |
{ | |
public function beginTransaction() | |
{ | |
$this->connect(); | |
// **** Note: transaction nesting level is NOW incremented, so connect method does not consider it *** | |
++$this->_transactionNestingLevel; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class MasterSlaveConnection | |
{ | |
public function connect($connectionName = 'slave') | |
{ | |
if ( $connectionName !== 'slave' && $connectionName !== 'master' ) { | |
throw new \InvalidArgumentException("Invalid option to connect(), only master or slave allowed."); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class MasterSlaveConnection | |
{ | |
public function beginTransaction() | |
{ | |
$this->connect('master'); | |
return parent::beginTransaction(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Service | |
{ | |
public function createUser(UserInterface $user) | |
{ | |
$em = $this->getEntityManager(); | |
$conn = $em->getConnection(); | |
$conn->beginTransaction(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Error 2: /var/www/beta.example.com/shared/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/Store.php line 92: unlink(/var/www/beta.example.com/releases/20120827020525/app/cache/beta/http_cache/md/c2/88/66a911b5266a57bdd55131a47895b8861dfd.lck): No such file or directory |