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 | |
[ | |
'router' => [ | |
'routes' => [ | |
'api.rest' => [ | |
'type' => 'Hostname', | |
'options' => [ | |
'route' => 'api.site.dev' | |
], |
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
/* | |
* 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 |
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
/* | |
* 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 = []) { |
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
/* | |
* I have 4 modules which are well loaded | |
*/ | |
// Action called | |
public function indexAction() { | |
$this->layout('layout/default'); | |
return [ |
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 | |
//The form declaration Class | |
$this->add(array( | |
'type' => 'Csrf', | |
'name' => 'sec', | |
'options' => array( | |
'csrf_options' => array( | |
'timeout' => 600 | |
) | |
) |
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
//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= user.id'); |
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
<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"/> | |
</div> | |
</div> |
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
/*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*/ |
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
<div> | |
<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> | |
</span> | |
<select required class="select-without-search form-control" name="gender" data-fv-notempty | |
data-placeholder="Select gender" |
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
$inputFilter->add($factory->createInput(array( | |
array( | |
'name' => 'birthday', | |
'validators' => array( | |
array( | |
'name' => 'Zend\Validator\Date', | |
'break_chain_on_failure' => true, | |
) | |
), | |
'filters' => array( |
NewerOlder