symfony

Symfony and Doctrine 1.2.2: How can i get the SQL clause of a Doctrine_Query object?

Hi, i have this code: $this->lista_miembros = $this->filtro->buildQuery($valores_query); var_dump($this->lista_miembros); var_dump outputs a Doctrine_Query object: object(Doctrine_Query)[121] protected '_subqueryAliases' => array I tried getSql() ... $q = Doctrine_Query::create() ->select('u.id') ->from('U...

symfony + doctrine + inheritance, how to make them work?

I am beginning to work with Symfony, I've found some documentation about inheritance. But also found this discouraging article, which make me doubt if Doctrine handles inheritance any good at all... Has anyone find a smart solution for inheritance in Symfony+Doctrine? As an example, I have already structured the database something lik...

should one use phpunit or lime with symfony?

i just wonder, should one use symfony's lime or phpunit for testing? what are the pros and cons with each one? thanks ...

Using Raw SQL with Doctrine

I have some extremely complex queries that I need to use to generate a report in my application. I'm using symfony as my framework and doctrine as my ORM. My question is this: What is the best way to pass in highly-complex sql queries directly to Doctrine without converting them to the Doctrine Query Language? I've been reading about ...

symfony: boolean columns not rendering checkbox widgets as checked

Using Doctrine in symfony 1.4 I have several boolean columns defined (stored as a tinyint in mySQL). The checkbox widgets are always rendering as checked, even when the returned value is '0'. It seems related to this ticket. Is this a common problem? Is there a workaround? I can get it working by changing line 70 in sfWidgetFormInputCh...

how to make symfony dump everything to screen

hey folks, this is a really simple question. I'd like symfony to dump everything on its mind to the browser. I deployed to production, and nothing's working. not the logs, not the views, nothing. I just get a blank page. is it possible to just see all of the [php/symfony] errors, somehow? ...

Convert Line breaks to html break for all field getters in Symfony project

I am working on a Symfony project and I currently have this: <?php echo preg_replace('/\n/','<br />', $review->getComments()); ?> and would very much like to be able to make all getters add html line breaks so i don't have to pepper my code with preg_replace. the $object->getFieldname methods are work automatically so I am looking to ...

Symfony forms - remembering a previously selected file

I am using Symfony 1.3.2 on Ubuntu and I have a form that contains several widgets. One widget is the sfWidgetFormInputFile, which allows a user to select a picture. If the form is not valid, I present it again to the user, to correct the erroneous field(s). The problem I am experiencing is that currently, when the foem fails to valida...

symfony/zend integration - blank screen

Hi, I need to use ZendAMF on a symfony project and I'm currently working on integrating the two. I have a frontend app with two modules, one of which is 'gateway' - the AMF gateway. In my frontend app config, I have the following in the configure function: // load symfony autoloading first parent::initialize(); // Integrate...

Reduce the number of additional Queries to 0 by overriding functions in the base model

my basic database setup is: User:... Info: relations: User: { foreignType:one } When displaying information on the user it takes: 1 query to find info on the user, and 1 query to find additional info I want to reduce this to one query that finds both, I assume I need to override a function from BaseUser.class.php, or some...

design-pattern libraries ready-to-use?

symfony has released some of their components free to use outside the framework. i have used the event dispatcher and dependency injection...they are awesome! i wonder if there are other components/libraries (from other frameworks etc) that in the same way help you manage various design patterns? eg. decorator, facade, singleton, chai...

Symfony 1.3: Any opinion about this code? Coud be shorter or better?

Hi, I need your opinion about this code below. I have a list of messages: each message has a link that change the state of the message (read - non read). In the partial "_message" i have this: <div class="switching_link" id="switching_link_<?php echo $message ?>"> echo include_partial('link_switch_state', array('message' =>...

validate input data with symfony, doctrine or zend_validate?

im using symfony with doctrine and zend. i wonder if i wanna validate the user input data, should i use validation from symfony, zend or even doctrine? i think i should go with symfony, but are there times the validation from zend or doctrine would be better? thanks ...

Symfony MarkDown File

Hi there! Sorry the basic doubt but is there any recommended way to open a file using symfony? I'm trying to open a MarkDown source file. Thanks for the help, Best regards! ...

Symfony MarkDown

Hi there! I'm trying to add some MarkDown capabilities to my symfony project (symfony version 1.3.3). To accomplish that, I had already included the MarkDown library into lib/vendor directory. Also, I added the need configuration in the autoload.yml for the previous library. However, I'm getting a fatal PHP error: Call to undefined func...

how to install symfony on shared web server?

I have created a project(on my Localhost) in symfony(PHP Framework), and need to upload it on server(i.e the WEB Server), but i dont know how to do that, i got many methods on net, but i was not able to follow that. so please help. ...

How to export primary keys on data-dump?

Hello, When I export my database with doctrine:data-dump, I encounter 2 problems: * the primary keys are not exported * instead of foreign keys columns correct name, it uses the name of the foreign table. For example, here are my tables: # schema.yml Planet: connection: doctrine tableName: planet columns: planet_id: ty...

[Symfony 1.2: ckWebServicePlugin 3.0.0] Module name in SOAP requests, how to get rid of them?

When I generate a WSDL file with ./symfony webservice:generate-wsdl (where is 'frontend', is 'soap' and is 'http://localhost ') I get a nice soap.wsdl file which works like it should. Except, the methods are not named 'justAMethod' but 'soapService_justAMethod' (where soapService is the module which holds the SOAP methods). How do ...

symfony get data from array

Hi, I'm trying to use an SQL query to get data from my database into the template of a symfony project. my query: SQL: SELECT l.loc_id AS l__loc_id, l.naam AS l__naam, l.straat AS l__straat, l.huisnummer AS l__huisnummer, l.plaats AS l__plaats, l.postcode AS l__postcode, l.telefoon AS l__telefoon, l.opmerking AS l__opmerking, o.org_i...

Symfony 1.3: how to force as inline the choices generated by renderLabel()

Hi, this line: <li><?php echo $form['genero']->renderLabel() ?></li> is generating <li> <label for="usuario_genero">Genero</label> <ul class="radio_list"> <li> <!-- this li doesn't have any id--> <input type="radio" checked="checked" id="usuario_genero_0" value="0" name="usuario[genero]">&nbsp;<label for="usuario_genero_0">Chi...