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
/** | |
* Add an item submitted via the app upload | |
* | |
* @param array $items An array of items for adding to the Trolley | |
* @return void | |
*/ | |
public function addFromApp($items) | |
{ | |
$pdo = DB::getPdo(); | |
$pdo->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
/** | |
* Add an item submitted via the app upload | |
* | |
* @param array $items An array of items for adding to the Trolley | |
* @return void | |
*/ | |
public function addFromApp($items) | |
{ | |
$pdo = DB::getPdo(); | |
$pdo->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
/** | |
* Add an item submitted via the app upload | |
* | |
* @param array $items An array of items for adding to the Trolley | |
*/ | |
public function addFromApp($items) | |
{ | |
$pdo = DB::getPdo(); | |
$pdo->beginTransaction(); | |
$statement = $pdo->prepare("INSERT INTO trolley_items ( `trolley_id`,`pack_id`,`price`,`quantity` ) |
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
$pdo = new \PDO('mysql:dbname=parfetts;host=localhost', '', ''); | |
$pdo->beginTransaction(); | |
$statement = $pdo->prepare("INSERT INTO trolley_items ( `trolley_id`,`pack_id`,`price`,`quantity` ) | |
VALUES | |
( ?, ?, ?, ? ) | |
ON DUPLICATE KEY UPDATE `quantity` = `quantity` + 1"); | |
$statement->execute(array($trolleyId, $packId, $price, $quantity)); | |
$pdo->commit(); |
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
/** | |
* Add an item submitted via the app upload | |
* | |
* @param $packId | |
* @param $quantity | |
* @param $price | |
* @param $trolleyId | |
*/ | |
public function addFromApp($packId, $quantity, $price, $trolleyId) | |
{ |
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
$return = $this->_client->search( | |
array( | |
'index' => self::INDEX, | |
'type' => self::TYPE, | |
'body' => array( | |
'query' => array( | |
'bool' => array( | |
'must' => array( | |
'multi_match' => array( | |
'query' => $query, |
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 Parfetts\Services; | |
class FileWriter | |
{ | |
private | |
$_fileObject; | |
/** | |
* @param $filename | |
* @return void |
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
whereNested ( function ( $query ) | |
{ | |
$query -> where ( 'year' , '>' , 2000 ); | |
$query -> where ( 'year' , '<' , 2005 ); | |
}) |
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 | |
/** | |
* SplClassLoader implementation that implements the technical interoperability | |
* standards for PHP 5.3 namespaces and class names. | |
* | |
* http://groups.google.com/group/php-standards/web/final-proposal | |
* | |
* // Example which loads classes for the Doctrine Common package in the | |
* // Doctrine\Common namespace. |
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
web1: #component type & number | |
name: irealms-pyrocms #component settings | |
shared_writable_dirs: | |
- /system/cms/cache/ | |
- /system/cms/logs/ | |
- /uploads/ | |
php_extensions: | |
- mysql | |
- gd | |
- curl |