Skip to content

Instantly share code, notes, and snippets.

Cyril Doopin

Block or report user

Report or block Doopin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View module.config.sample.php
'router' => [
'routes' => [
'' => [
'type' => 'Hostname',
'options' => [
'route' => ''
Doopin / EmailService.php
Created Sep 16, 2016
Zend raises an exception if my email subject contains non-ASCII charcters. How to solve it please?
View EmailService.php
* Here is one method of my email service.
* When the email subject contains non ASCII characters, its raised and exeption "invalid subject detected"
* It works like a charm if subject only contains ASCII characters
* Send an email
* @param \xxxxx\Model\Interfaces\Messages\EmailInterface $emailObject
* @return boolean
Doopin / settings.php
Last active Jun 23, 2016
ZF2 CSRF Field not working as expected
View settings.php
* Hello Guys, going through something weird with ZF2 CSRF Field
* Please check this gist for my non-working settings
// LoginForm.php
class LoginForm extends MainForm {
public function __construct($name = 'loginForm', $options = []) {
Doopin / zf2.php
Created Jun 17, 2016
Configuration Issue ZF2
View zf2.php
* I have 4 modules which are well loaded
// Action called
public function indexAction() {
return [
Doopin / add.php
Last active Oct 11, 2015
Csrf field validation always fails
View add.php
//The form declaration Class
'type' => 'Csrf',
'name' => 'sec',
'options' => array(
'csrf_options' => array(
'timeout' => 600
Doopin / HydratingResultSet ZF2
Created May 13, 2015
How to reset HydratingResultSet for many iterations?
View HydratingResultSet ZF2
//In myMapper class, I have this method
public function loadAllPosts() {
$postObject = new Post();
$userObject = new User();
$select = new Select();
$select->from(['post' => $postObject->tableName()])
->join(['user' => $userObject->tableName()], 'post.user=');
Doopin / gist:215cd04df2d48a425079
Created Apr 27, 2015
Validation not working for date format YYYY-MM
View gist:215cd04df2d48a425079
<div class="form-group">
<label for="startDate" class="col-xs-12 control-label">Start date</label>
<div class="col-xs-12">
<input id="startDate" required name="experience[startDate]" data-fv-notempty-message="date is required"
type="date" placeholder="YYYY-MM" class="form-control revalidate start-date input-sm single-date-picker-month"
data-fv-date="true" data-fv-date-separator="-" data-fv-date-format="YYYY-MM" data-fv-date-message="Invalid date"/>
View gist:74817920a3847c198332
/*Put this CSS declaration in another file which will be loadeed after Select2 Css file*/
/* He we reset the border-radius only for a particular bloc */
#sign-up-form .select2-container .select2-selection--single {
border-bottom-left-radius: 0;
border-top-left-radius: 0;
/* This css will force select2 box heigth to match with standard Bootstrap input element height*/
Doopin / gist:d639d045f6985b671f05
Created Apr 4, 2015
How to fix this On Select2 4 with Bootstrap 3.3.4
View gist:d639d045f6985b671f05
<div class="form-group">
<div class="col-sm-6">
<label class="control-label" for="gender"><?php echo ucfirst($this->translate('sexe')); ?></label>
<div class="input-group">
<span class="input-group-addon">
<span class="icomoon-mars"></span>
<select required class="select-without-search form-control" name="gender" data-fv-notempty
data-placeholder="Select gender"
View gist:f6fc72c5ac8fdc3243fc
'name' => 'birthday',
'validators' => array(
'name' => 'Zend\Validator\Date',
'break_chain_on_failure' => true,
'filters' => array(
You can’t perform that action at this time.