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 xxx\AppBundle\Model\User\Search; | |
class UserSearch implements \ArrayAccess, \IteratorAggregate, \Countable | |
{ | |
private $data = []; | |
public function &__get ($key) |
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
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then | |
export TERM=gnome-256color | |
elif infocmp xterm-256color >/dev/null 2>&1; then | |
export TERM=xterm-256color | |
fi | |
if tput setaf 1 &> /dev/null; then | |
tput sgr0 | |
if [[ $(tput colors) -ge 256 ]] 2>/dev/null; then | |
MAGENTA=$(tput setaf 9) |
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
/** | |
* @Route("/validator", name="route_name") | |
*/ | |
public function validationAction(Request $request) | |
{ | |
$object = new typeOfObject(); | |
$form = $this->container->get('form.factory')->create(new ObjectFormType(), $object); | |
$form->submit($request); | |
$violations = $this->container->get('validator')->validate($object); |
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
$errors = $this->get('validator')->validate($user, array('user')); | |
foreach ($errors as $error) { | |
$form->get($error->getPropertyPath())->addError(new FormError($error->getMessage())); | |
} |
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 | |
public function testWebdriver($args = '', $opt = ['test|t' => null]) | |
{ | |
$test = $opt['test'] ? ':'.$opt['test'] : ''; | |
$container = $this->taskDockerRun('davert/selenium-env') | |
->detached() | |
->publish(4444,4444) | |
->env('APP_PORT', 8000) | |
->run(); |
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_process_packages": | |
[ | |
], | |
"installed_packages": | |
[ | |
"Alignment", | |
"AndyPHP", | |
"Behat Features", | |
"GitGutter", |
A function which has an object and a locale as parameter.
- The object holds an array of translations
->getTranslations()
and->getTranslation($locale)
are available - Locale is a dead simple string of 2 chars
- The function has access to an array of locales ordered by priority
- The locale parameter should be priority #1, otherwise the array of priorities is used to get the correct locale.
class Testing {
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
parameters: | |
... | |
mailer_transport: smtp | |
mailer_host: 'localhost:1025' | |
mailer_user: null | |
mailer_password: null |
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
# Webfolks KVM preseed | |
d-i debian-installer/splash boolean false | |
### Keyboard selection ### | |
d-i keyboard-configuration/layoutcode string us | |
d-i keyboard-configuration/variantcode string | |
### Locale ### | |
d-i debian-installer/locale string en_US.UTF-8 |
OlderNewer