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 | |
// Inside ZendTest\Form\View\Helper\FormSelectTest | |
public function getScalarOptionsDataProvider() | |
{ | |
return array( | |
array(array('string' => 'value')), | |
array(array('int' => 1)), | |
array(array('int-neg' => -1)), | |
array(array('hex' => 0x1A)), |
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
The following tasks need to be done to finish the i18n component: | |
------------------------------------------------------------------------------ | |
To finish translator: | |
- Add Xliff translation loader with plural support if possible, see: | |
https://wiki.oasis-open.org/xliff/XLIFF2.0/Feature/Plural%20Entries | |
- Add Tmx translation loader (identify if plural support is available) | |
- Complete unit tests | |
------------------------------------------------------------------------------ |
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
Old validators with Zend\Locale\Format, passing: | |
public function deLocaleStringsProvider() | |
{ | |
return array( | |
array('1,3', true), | |
array('1000,3', true), | |
array('1.000,3', true), | |
array('1.3', false), | |
array('1000.3', false), |
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
#!/usr/bin/env php | |
<?php | |
/** | |
* .git/hooks/pre-commit | |
* | |
* This pre-commit hooks will check for PHP errors (lint), and make sure the | |
* code is PSR-2 compliant. | |
* | |
* Dependecy: PHP-CS-Fixer (https://github.com/fabpot/PHP-CS-Fixer) | |
*/ |
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
$multicbElement | |
->setAttributes(array( | |
'id' => 'my-multicb', | |
'options' => array( | |
'Option 1' => 'option1', | |
'Option 2' => array( | |
'value' => 'option2', | |
'labelAttributes' => array( | |
'class' => 'checkbox inline zf-green' | |
), |
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\Form; | |
use Zend\Form\Form; | |
use Zend\Form\Element; | |
class FileUploadForm extends Form | |
{ | |
public function __construct($name = null, $options = 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
#!/bin/bash | |
#################################################################################### | |
## ## | |
## gittyup() - Easily keep master in sync with upstream. ## | |
## ## | |
## Author: Evan Coury, http://blog.evan.pro/ ## | |
## URL: https://gist.github.com/1506822 ## | |
## Forked: https://gist.github.com/cgmartin/4046453 ## | |
## ## | |
## This bash function is a simple shortcut for keeping your local (and public ## |
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 function createTableFactory($tableName) { | |
return function($sm) use ($tableName) { | |
$tableGateway = $sm->get(ucfirst($tableName) . 'TableGateway'); | |
$tableClass = ucfirst($tableName) . 'Table'; | |
$table = new $tableClass($tableGateway); | |
}; | |
} | |
protected function createTableGatewayFactory($tableName) { | |
return function($sm) use ($tableName) { | |
$dbAdapter = $sm->get('Zend\Db\Adapter\Adapter'); |
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 | |
$this->navigation()->getPluginManager()->setAllowOverride(true)->setInvokableClass('menu', '\My\Helper'); | |
// In Module.php | |
public function getViewHelperConfig() | |
{ | |
return array( | |
// Change the Navigation View Helper plugins for ALL modules | |
'initializers' => 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
<?php | |
/** | |
* Zend Framework (http://framework.zend.com/) | |
* | |
* @link http://github.com/zendframework/ZendSkeletonApplication for the canonical source repository | |
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) | |
* @license http://framework.zend.com/license/new-bsd New BSD License | |
*/ | |
namespace Application\Controller; |
OlderNewer