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
/** | |
* Initialize form (extended from HouseSimple_Form) | |
* | |
* @return void | |
*/ | |
public function init() | |
{ | |
$this->setMethod('post'); | |
$this->setAttrib('class', 'Form Form--user'); | |
$this->setAction($this->getView()->url()); |
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
/** | |
* hs.property-questionnaire.js | |
* | |
* Property questionnaire scripts. | |
*/ | |
(function($) { | |
// Set-up questionnaire namespace. | |
Hs.questionnaire = {}; |
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 Application\Migrations; | |
use Doctrine\DBAL\Migrations\AbstractMigration; | |
use Doctrine\DBAL\Schema\Schema; | |
use Doctrine\DBAL\Types\Type; | |
/** | |
* Create tables for the referral system. |
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 Application\Migrations; | |
use Doctrine\DBAL\Migrations\AbstractMigration; | |
use Doctrine\DBAL\Schema\Schema; | |
/** | |
* Class Version20150625094625 | |
* @package Application\Migrations |
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 | |
printf("\r" . str_repeat("=", round(($key / $count) * 100)) . "> %d%% (%s/%s)", round(($key / $count) * 100), $key, $count); |
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
// Configure any shout boxes | |
$shoutBoxes = []; | |
$shouts = $this->entityManager->getRepository('AppBundle:ShoutBox') | |
->findBy(['active' => 'active', 'deleted' => 0]); | |
if (!empty($shouts)) { | |
foreach ($shouts as $shout) { | |
$shoutBoxes[] = [ | |
'name' => $shout->getName(), | |
'icon' => '', |
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
// Configure any shout boxes | |
$shoutBoxes = []; | |
$shouts = $this->entityManager->getRepository('AppBundle:ShoutBox') | |
->findBy(['active' => 'active', 'deleted' => 0]); | |
if (!empty($shouts)) { | |
foreach ($shouts as $index => $shout) { | |
$shoutBoxes[$index] = [ | |
'name' => $shout->getName(), | |
'icon' => '', |
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 AppBundle\Util; | |
use Buzz\Browser; | |
use Buzz\Exception\RequestException; | |
/** | |
* Class Buzz | |
* @package AppBundle\Util |
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
/** | |
* @param string | |
* @return string | |
*/ | |
function camelCaseToUnderscore($string) | |
{ | |
// Default patterm | |
$pattern = array('#(?<=(?:[A-Z]))([A-Z]+)([A-Z][A-z])#', '#(?<=(?:[a-z0-9]))([A-Z])#'); | |
// Check fo unicode support |
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
SELECT | |
concat(round((Count(case when pr.`price` > 0 AND pr.`price` <= 50000 then 1 end) / Count(1) * 100), 2 ),'%') As '£0 - £50K', | |
concat(round((Count(case when pr.`price` > 50000 AND pr.`price` <= 100000 then 1 end) / Count(1) * 100), 2 ),'%') As '£50 - £100K', | |
concat(round((Count(case when pr.`price` > 100000 AND pr.`price` <= 150000 then 1 end) / Count(1) * 100), 2 ),'%') As '£100 - £150K', | |
concat(round((Count(case when pr.`price` > 150000 AND pr.`price` <= 200000 then 1 end) / Count(1) * 100), 2 ),'%') As '£150K - £200K', | |
concat(round((Count(case when pr.`price` > 200000 AND pr.`price` <= 250000 then 1 end) / Count(1) * 100), 2 ),'%') As '£200K - £250K', | |
concat(round((Count(case when pr.`price` > 250000 AND pr.`price` <= 300000 then 1 end) / Count(1) * 100), 2 ),'%') As '£250K - £300K', | |
concat(round((Count(case when pr.`price` > 300000 AND pr.`price` <= 350000 then 1 end) / Count(1) * 100), 2 ),'%') As '£300K - £350K', | |
concat(round((Count(case when pr.`price` > 350000 AND pr.`price` <= 400000 then 1 end) |