This file contains hidden or 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 OrderFoundViewModel | |
{ | |
public $orderId; | |
public $orderCreationDate; | |
public $total; | |
public $state; | |
public $items = array(); | |
This file contains hidden or 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
ansible-playbook app/config/deploy/deploy.yml -i app/config/deploy/hosts.ini -e "symfony2_project_release=1" |
This file contains hidden or 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
--- | |
- hosts: prod_server | |
vars: | |
symfony2_project_name: project_name | |
symfony2_project_root: /path/to/project/root | |
symfony2_project_repo: git repository url (i.e from github or bitbucket) | |
symfony2_project_branch: git repository that you want deploy | |
ansible_ssh_user: ssh user that ansible use for connection | |
symfony2_project_env: prod | |
symfony2_project_console_opts: '' |
This file contains hidden or 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
[prod_server] | |
162.x.x.x #your ip address |
This file contains hidden or 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
ansible-galaxy install servergrove.symfony2 -p YOUR_SYMFONY_PROJECT/app/config/deploy #path location is your choice |
This file contains hidden or 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
//controller | |
public function indexAction(Request $request) | |
{ | |
//retrieve collection of question i.e from a json | |
... | |
$survey = new Survey(); | |
This file contains hidden or 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
class Survey | |
{ | |
... | |
/** | |
* @ORM\OneToMany(targetEntity="Question", mappedBy="survey", cascade="persist") | |
**/ | |
private $questions; | |
... |
This file contains hidden or 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 | |
// the connection configuration | |
$dbParamsMaster = array( | |
'driver' => 'pdo_mysql', | |
'user' => 'ideato', | |
'password' => 'ideato', | |
'dbname' => 'db_ideato', | |
); |
This file contains hidden or 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 | |
$conn = \Doctrine\DBAL\DriverManager::getConnection(array( | |
'wrapperClass' => 'Doctrine\DBAL\Connections\MasterSlaveConnection', | |
'driver' => 'pdo_mysql', | |
'keepSlave' => true, | |
'master' => array( | |
'user' => 'ideato', | |
'password' => 'ideato', | |
'dbname' => 'db_ideato' |
This file contains hidden or 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 | |
$container = new Navigation(array( | |
array( | |
'label' => 'Customers', | |
'class' => 'dropdown-toggle', | |
'uri' => '#', | |
'pages' => array( | |
array( | |
'label' => 'View all customers', |