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
$recaptcha = new Captcha\ReCaptcha(); | |
$recaptcha | |
->setOption( 'theme', $theme ) | |
->setPubKey( '6Ld-&hl='.$lang) | |
->setPrivKey( '6Ld-' ) | |
->setMessage( _( "Correctly repeat the text in the image, in the box beneath it" ) ); | |
$captcha = new Element\Captcha( 'captcha' ); | |
$captcha |
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
$sem->attach('Zend\Mvc\Application', MvcEvent::EVENT_ROUTE, function( MvcEvent $ev) use($sm,$em) { | |
$rm = $ev->getRouteMatch()->getMatchedRouteName(); | |
if( getenv("environment") === "master" && $rm == 'zfcuser' ) | |
{ | |
$ev->setRouteMatch( /* switch the route out here */ ); | |
} | |
}); |
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
$(document).ready( function(){ | |
if( $.cookie('welcome_register') ) | |
{ | |
// show the thanks div | |
$.removeCookie('welcome_register', { path: '/' }); | |
} | |
}); |
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\Controller; | |
use Aws\DynamoDb\DynamoDbClient; | |
use Aws\DynamoDb\Enum\ComparisonOperator; | |
use Aws\DynamoDb\Enum\Type; | |
use Zend\Mvc\Controller\AbstractActionController; | |
use Zend\View\Model\JsonModel; | |
use Zend\View\Model\ViewModel; |
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
-webkit-box-shadow: 0px 0px 15px 3px rgba(50, 50, 50, 0.8); | |
-moz-box-shadow: 0px 0px 15px 3px rgba(50, 50, 50, 0.8); | |
box-shadow: 0px 0px 15px 3px rgba(50, 50, 50, 0.8); |
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
$("#sort").on('change', function( e ){ | |
var sort = $(this).val(); | |
$("div#collage").empty(); | |
$("div#collage").spin('show'); | |
$.get( '/redeem/sweeps/sort', { 'sort': sort }, function( data ){ | |
$("div#collage").html( data ); | |
Ladda.bind( 'button.ladda-button' ); | |
}); |
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
$eventManager->attach( MvcEvent::EVENT_DISPATCH, function( MvcEvent $e ){ | |
$route_name = 'something'; | |
$new_template = 'something-else'; | |
if( $e->getRouteMatch() && $e->getRouteMatch()->getMatchedRouteName() == $route_name ) | |
$e->getViewModel()->setTemplate( $new_template ); | |
}); |
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 ApplicationTest; | |
use Zend\Loader\AutoloaderFactory; | |
use Zend\Mvc\Service\ServiceManagerConfig; | |
use Zend\ServiceManager\ServiceManager; | |
use RuntimeException; | |
error_reporting(E_ALL | E_STRICT); |
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
/** | |
* Class UserFormFactory | |
* @package CirclicalUser\Factory\Form | |
*/ | |
class UserFormFactory implements FactoryInterface, MutableCreationOptionsInterface | |
{ | |
/** | |
* @var array | |
*/ |
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
protected static function initAutoloader() | |
{ | |
$vendorPath = static::findParentPath('vendor'); | |
if (file_exists($vendorPath . '/autoload.php')) { | |
include $vendorPath . '/autoload.php'; | |
} | |
include $vendorPath . '/zendframework/zend-loader/src/AutoloaderFactory.php'; | |
AutoloaderFactory::factory(array( |
OlderNewer