Skip to content

Instantly share code, notes, and snippets.

View emil-nasso's full-sized avatar

Emil Andersson emil-nasso

  • SAVR AB
  • Falkenberg
View GitHub Profile
$targetValues = [];
$crawler->filter("input[name='target[]']")->each(function(Crawler $target) use (&$targetValues){
$targetValues[] = $target->attr('value');
});
var_dump($targetValues);
$elements = $crawler->filter("input[name='target[]']");
foreach($elements as $element){
print get_class($element);
}
doctrine:
dbal:
driver: "%database_driver%"
host: "%database_host%"
port: "%database_port%"
dbname: "%database_name%"
user: "%database_user%"
password: "%database_password%"
#Remove this (version) when we have a real database. This is just a temporary fix to avoid errors in prod
server_version: "5.2"
templating:
engines: ['twig']
hinclude_default_template: 'Layouts/loading.html.twig'
assets_base_urls:
http: [ /symfony ]
ssl: [ /symfony ]
public function loadUserByUsername($username)
{
return new User($username);
}
/**
* {@inheritdoc}
*/
public function loadUserByOAuthUserResponse(UserResponseInterface $response)
{
/**
* @Route("/mini-api")
* @Method("POST")
*/
class ApiController extends Controller
{
/**
* @Route("/customer/create.{_format}", name="mini-api_customer_create", requirements={
"_format" : "json"
* })
->add('email', 'email', [
'constraints' => [
new NotBlank(),
new Email(),
]
])
->add('currency', 'text', [
'constraints' => [
new NotBlank(),
new Choice(['choices' => ['EUR', 'SEK']]),
]
])
->add('account', 'text', [
'constraints' => [
new NotBlank(),
new Type('string'),
new Regex("/^XX\d+$/i")
]
])
$killmail = $this->getDoctrine()->getRepository('AppBundle:Killmail\Killmail')->findWithAllData($id);
$killmail2 = $this->getDoctrine()->getRepository('AppBundle:Killmail\Killmail')->find(47017875);