silex Questions
4
Solved
Is it possible to directly access an array index from within a Twig template?
Here's my setup, using Silex:
return $app['twig']->render('template', array('numbers' => array('one', 'two', 't...
2
Solved
What is the difference between use and include in Twig?
Documentation:
include
The include statement includes a template and returns the rendered content of that template into the current on...
5
Solved
I have an array of user records (0 indexed, from a database query), each of which contains an array of fields (indexed by field name). For example:
Array
(
[0] => Array
(
[name] => Fred
...
3
Solved
I don't have a specific problem, just looking to deepen my understanding of what's going on with Silex and with some new-ish PHP features in general. This is based off the code samples on the "usag...
Serial asked 6/4, 2013 at 14:56
2
Solved
I have a basic silex application, and I try to test it using HTTPie. Yet when posting using:
http POST http://localhost:1337 data="hello world"
The data, that I get from the Request object via:
...
6
Solved
We have narrow down our search between Silex and Slim PHP frameworks for routing our REST APIs on our Apache/PHP/MySQL Server.
Both seem to have good reviews. Silex has probably a bigger community...
8
Solved
I would like to try Silex but i've some questions.
I know to use Symfony2 and i would like to know if Silex is very different of Symfony or it's the same thing (same operation, same code... ) ?
M...
Kuska asked 29/6, 2012 at 23:6
3
Solved
According to the Silex documentation:
Symfony provides a Twig bridge that provides additional integration between some Symfony2 components and Twig. Add it as a dependency to your composer.json ...
2
Solved
I'm having trouble validating a value to allow NULL but not an empty string with the Symfony2 validator component.
I've integrated the component in a Silex application and used the Property Constr...
Umbilicus asked 13/4, 2012 at 8:20
3
I just need to autoload some classes, and I don't like the psr-0 namespace insanity (no offense).
This used to work just fine in my project:
"psr-0": {
"": [
"app/controller/",
"app/model/"
]...
Jurist asked 28/7, 2013 at 17:4
4
Solved
I am using Silex and Twig for a website and I want to allow the user to change the langage of the site.
My problem
Right now, it works if I change the locale in the URL :
/my-account: my page co...
3
Solved
My question: How do I permit use of debug in Twig templates within Silex?
I'm playing around with the Silex micro-framework (a PHP framework that leverages Symfony).
When using the Twig templa...
2
Solved
I have a problem with TWIG. This code works at school but absolutely not with my laptop. I tried with a simple code but I have the error:
Catchable fatal error: Argument 1 passed to Twig_Filter...
5
Solved
I'm using Silex and can't use the is_granted function in a template. I can't find anything in the docs about why this isn't working. Any hints?
$app->register(new Silex\Provider\SecurityService...
2
Solved
I am searching for an easy way to add a bundle of fields to each form.
I have found a way to extend the AbstractType and use the buildForm method to add more fields.
When creating the form I give ...
Dextro asked 14/3, 2014 at 19:32
2
Solved
I wonder how can I see syntax errors like this (missing semicolon):
<?php
var_dump($app)
?>
This will cause a WSOD (white screen of death).
I tried to include a debug config file which lo...
1
Solved
I'm doing some programming in Silex with the symfony components and I think I have found a bug with the symfony/serializer and the symfony/validator components.
First let me explain what I'm train...
Sindysine asked 6/2, 2017 at 18:35
2
I want a simple way to access $app and $request in my controller classes. The document says to do this,
public function action(Application $app, Request $request) {
// Do something.
}
but it do...
Snapshot asked 10/7, 2013 at 4:35
3
Solved
In Pimple 1.0 I used to be able to share class instances like this:
$app['some_service'] = $app->share(function () {
return new Service();
});
This now seems to be deprecated and I am unable...
2
Solved
I am trying to use Doctrine ORM with Silex, and finding it an altogether frustrating experience, due to the lack of consistent documentation.
When I run vendor/bin/doctrine at the console, I get t...
3
Solved
Let my application run on localhost, the path is: localhost/silex/web/index.php, defined routes as in the code below, I'd expect visiting localhost/silex/web/index.php/redirect redirects me to loca...
Habitual asked 3/3, 2014 at 9:20
2
Solved
First of all, I just want to mention that this is not an "issue" at all. Deleting with Doctrine DBAL is not a problem and I am able to do it.
What I actually wanted to know is if there is way to d...
Abduce asked 10/7, 2015 at 10:1
3
Solved
Is it possible to configure a Silex Application with YAML config files? I bet yes, but how is it done correctly? For instance I want to use different configurations according to the environment, li...
2
Solved
I am trying to write some tests for Silex using phpunit.
I have a class Symfony\Component\BrowserKit\Client that generates a Crawler object.
This object expects the results of the client to be xh...
2
Solved
I am using Silex 2 and I would like to redirect to homepage with default locale if any url is loaded using an invalid locale.
// homepage / root
$this->get('{_locale}/', function (Request $re...
Martino asked 19/8, 2016 at 8:57
1 Next >
© 2022 - 2025 — McMap. All rights reserved.