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 Interprac\Bundle\UtilityBundle\Form; | |
use Symfony\Component\Form\Form; | |
class FormErrors | |
{ | |
public function getArray(Form $form, $style = 'KO') | |
{ |
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 Acme\DemoBundle\Controller; | |
use Symfony\Bundle\FrameworkBundle\Controller\Controller; | |
use Symfony\Component\HttpFoundation\Request; | |
use Symfony\Component\HttpFoundation\Response; | |
use Symfony\Component\Security\Core\Role\SwitchUserRole; |
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 | |
/** | |
* Do an opposite of what array_dot does | |
* | |
* @param array $array | |
* @param string $delimiter | |
* @return array "undotted" nested array | |
*/ | |
function array_undot(array $array, $delimiter = '.') |
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_Queue background job abstract class | |
* | |
* @author Bernard Baltrusaitis <bernard@runawaylover.info> | |
*/ | |
abstract class My_Job | |
{ | |
/** | |
* |
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 My\Doctrine; | |
use Doctrine\ORM\EntityRepository; | |
/** | |
* Custom Repository extending basic EntityRepository functionality | |
* | |
* @author Bernard Baltrusaitis <bernard@runawaylover.info> |
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
git branch -vv | grep ": gone]" | awk '{ print $1 }' |
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 My\Doctrine\ORM\Tools\Console\Command\SchemaTool; | |
use Doctrine\ORM\Tools\Console\Command\SchemaTool\UpdateCommand as UpdateCommand2, | |
Symfony\Component\Console\Input\InputArgument, | |
Symfony\Component\Console\Input\InputOption, | |
Symfony\Component\Console\Input\InputInterface, | |
Symfony\Component\Console\Output\OutputInterface, | |
Doctrine\ORM\Tools\SchemaTool, | |
Doctrine\ORM\Tools\Console\MetadataFilter; |
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 | |
class My_Form extends \Zend_Form | |
{ | |
/** | |
* Flatten Zend_Form error messages | |
* | |
* @param \Zend_Form|null $form | |
* @param array|null $messages | |
* @param int $i | |
* @return 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 | |
namespace My; | |
use Doctrine\Common\Util\Inflector; | |
/** | |
* Allow to access array properties using getters/setters | |
* | |
* @method null set${Property}(mixed $value) set array property | |
* @method mixed get${Property}() get array property | |
* @author Bernard Baltrusaitis <bernard@runawaylover.info> |
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 My\Doctrine\Hydration; | |
use Doctrine\ORM\Internal\Hydration\ArrayHydrator, | |
My\ArrayObject as ArrayObject; | |
/** | |
* Custom Doctrine2 hydrator, allows to access array properties using getters like | |
* in ObjectHydrator | |
* |
OlderNewer