Questions tagged [symfony-components]

Symfony Components are standalone classes which implement common features. They are the foundation of the Symfony framework.

The Components

All components as of Symfony 2.3.0:

72 questions
0
votes
2 answers

Symfony2 components, class instances

Question is why $config = array(__DIR__ . '/app/config'); $locator = new Symfony\Component\Config\FileLocator($config); $loader = new Symfony\Component\Routing\Loader\YamlFileLoader($locator); $routes_collection = $loader->load('routes.yml'); Here…
Itsmeromka
  • 3,621
  • 9
  • 46
  • 79
0
votes
1 answer

Symfony config component and service for Doctrine DBAL

This is a continuation of Symfony config component and Doctrine dbal I am trying to create service for doctrine now like this:
Itsmeromka
  • 3,621
  • 9
  • 46
  • 79
0
votes
0 answers

Symfony config component and Doctrine dbal

Via composer i installed doctrine dbal and symfony2 config component "require":{ "symfony/dependency-injection": "2.4.*", "symfony/filesystem": "2.4.*", "symfony/config": "2.4.*", "doctrine/dbal": "2.3.4" } I autoload them via …
Itsmeromka
  • 3,621
  • 9
  • 46
  • 79
0
votes
1 answer

How do you interface an event dispatcher?

I'm attempting to interface an event dispatcher and having a hell of a time coming up with a solution. So far i have the following simple interface: interface EventDispatcherInterface { public function fire($name, $data); } Now i'm trying to…
David
  • 10,418
  • 17
  • 72
  • 122
0
votes
0 answers

Validation Class not found

I am using symfony2 validator component. I have downloaded zip files from pear.symfony.com. Unzipped files and now my directory structure is as following. -Symfony -index.php index.php has following code to just test that validation class is being…
user3109712
  • 73
  • 2
  • 7
0
votes
1 answer

How to override less file of bootstrap in symfony2 with components/bootstrap?

I'm using components/bootstrap bundle in my symfony2 project by composer to provide bootstrap. The less files are in /verdor/components/bootstrap/less/ and it will automatically make copies (maybe links?) to /web/components/bootstrap/less/ So, what…
Phoenix
  • 756
  • 1
  • 7
  • 22
0
votes
2 answers

Symfony 2 Controller dependencies, extending ContainerAware

Edit after digging into the symfony code, particularly the ControllerResolver, it seems what im trying to do actually isnt possible unless i subclass/implement ControllerResolverInterface myself. this is the following code which instantiates the…
djjjuk
  • 368
  • 1
  • 2
  • 14
0
votes
1 answer

How to use controller as service in a yaml resource file

I'm using Silex Framework. I wrote a simple route resource loader that is used that way : $app->register( new RouteCollectionLoaderProvider); $app["mp.route_loader"]->append(array( array( "type"=>"yaml", …
mpm
  • 20,148
  • 7
  • 50
  • 55
0
votes
1 answer

PHPUnit mocking an object don't work

I'm new to mocking objects in PHPUnit and can't get it working. I am building an extension of the current SensioGeneratorBundle (for Symfony2). I use PHPUnit 3.7 installed via PEAR. It is running on PHP 5.3.5 (as PEAR is installed in that…
Wouter J
  • 41,455
  • 15
  • 107
  • 112
-1
votes
1 answer

You have requested a non-existent parameter "name" error when trying to load a template using Symfony templating component

I am using the Symfony templating component to add templating functionality to the project I am working on, I am following the docs here but I am using the service container Symfony component and adding the code in the docs using this…
Muhamad Bhaa Asfour
  • 1,075
  • 3
  • 22
  • 39
-1
votes
1 answer

Symfony2 Class Loader loadClass()

I have a problem with a Symfony2 ClassLoader Component. Start code: require_once("vendor/autoload.php"); use Symfony\Component\ClassLoader\UniversalClassLoader; $loader = new UniversalClassLoader(); …
-10
votes
2 answers

Goutte won't load an ASP SSL page

I am trying out Goutte, the PHP web crawler based on Symfony2 components. I've successfully retrieved Google in both plaintext and SSL forms. However, I've come across an ASP/SSL page that won't load. Here's my code: // Load a crawler/browser…
halfer
  • 19,824
  • 17
  • 99
  • 186
1 2 3 4
5