Re: [symfony-users] Re: Content Negotiation Functionality
With symfony 1.x you can easily get access to ALL request headers in your controller actions. Using this, you can also alter the response headers as well as the content you respond with by reading what the request header is. If you wish to do this across an entire application you can also pre or post filters to help manage it easier. With Symfony 2 I am not sure as I have not yet spent enough time learning the newer version, primarily because our deployment servers cannot install a PHP version higher than 5.1 right now. On Thu, Mar 31, 2011 at 8:07 AM, Tobias webmas...@tubo-world.de wrote: Hey, that's also what I need. I made it work in sf1.4 but it was only hacked together. As far as I see such functionally is also not prebuilt in sf2. Thats a pity because its a regular use case. I imagine a custom route which supports to specify all available formats and then returns the most appropriate according to Accept header. It should also include the Content-Location header in the response and allow generic URI which have the Vary response header. Example: article_show: class: ContentNegotiationRoute pattern: /articles/{year}/{title}.{_format} defaults { _controller: AcmeDemo:Article:show, _format: html } requirements: _format: html|rss|json year: \d+ So /articles/2011/title would return 200 with Content-Location / articles/2011/title.html and Vary: Accept And the format requirement can be used to specify all available formats for this route. And the URL-generator needs to return the generic URI when no format specified. On 29 Mrz., 02:01, raviu ravi.undupit...@gmail.com wrote: Hi, I'm embarking on a project where I require one URL to provide multiple formats of a document. The document should be served depending on the Accept field of the HTTP header. HTML or RDF. I know this can be done using apache mod_rewrite. Just want to know if this functionality is supported by Symfony and if so is it as simple as updating a htaccess file? Thanks, Ravi -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Re: Content-type negotiation
http://www.symfony-project.org/api/1_0/sfWebRequest#method_getacceptablecontenttypes http://www.symfony-project.org/api/1_0/sfWebRequest#method_getacceptablecontenttypes ? Regards, Before Printing, Think about Your Environmental Responsibility! Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale! On Wed, Jan 12, 2011 at 4:51 PM, Dennis gear...@sbcglobal.net wrote: As far as real content negotiation as per the HTTP standard, choosing which one out of an offered, prioritized set of ACCEPT: mime types, I haven't seen anything done in Symfony on any forum, tutorial, etc. There MAY be a native way to to that in Symfony 1, using the config files, but I woulldn't be any money on it. It would be really good question for Favian Ponifier(sp). To me, if it wasn't native to Symfony, iether one, the obvious place to put it would be to extend the Response and its use of the header ACCEPT vs template files. Something almost like a routing file seems natural,where it falls through from highest to lowest availability, but id dynamically ordered. So you'd have an array of available output types, their lower equivilancies, and then a way that parses the ACEPT header to order that array. Probably the coolest way to do it would be to have the template files have the base type in their extension, and then a mimetype in them. You could hve mulitple xml types then, but with specific versions and micoformats. Just a thought. On Jan 12, 6:28 am, Stéphane stephane.er...@gmail.com wrote: In routes.yml, you can define the :sf_format and set its default value I guess. Regards, Before Printing, Think about Your Environmental Responsibility! Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale! On Wed, Jan 12, 2011 at 2:41 PM, Renoir Boulanger r...@evocatio.com wrote: This response is based upon my own memory. It's been a while since I read how to do it. Content type negociation are set in configuration file (view.yml, settings.yml?) and can be specified in actions. Not to forget that you can also use format specific templates e.g.: modules/potato/templates/clients.json.php I cant' recall where I've seen this more in detail hope it helps RENOIR BOULANGER // devLABmtl.org/ ConFoo.ca/ evocatio.com/ (envoyé de mon téléphone) ~ On 2011-01-11, at 16:15, paulkmoore paulkmo...@gmail.com wrote: Hi all I'm new to Symfony and tried posting this in the forum, but I'm not convinced that audience is correct. I am building a REST API for our application, and have been looking at the sfDoctrineRestGeneratorPlugin which looks very promising (and extensible - thanks). However, the library does not appear to provide Content-Type negotiation, which I'd like to use to establish the response format rather than using an extension (.xml, .yaml etc) based approach. Investigating further I am unable to find any content-type negotiation capabilities in Symfony, and am therefore wondering if: i) I've just missed it - please let me know (Note: I've also searched the plug-ins without success) ii) They're isn't any and people build this capability as required (I've previously used the PECL_Http http_negotiate_content_type http://uk3.php.net/manual/en/function.http-negotiate-content-type.php functionality for this purpose) Many thanks Paul -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com symfony-users%2bunsubscr...@googlegroups.comsymfony-users%252bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at
Re: [symfony-users] Re: Content-type negotiation
I don't know if there is a way to say html first, then xml, then json, kind of 0.8, 0.5, etc. Regards, Before Printing, Think about Your Environmental Responsibility! Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale! On Wed, Jan 12, 2011 at 4:54 PM, Stéphane stephane.er...@gmail.com wrote: http://www.symfony-project.org/api/1_0/sfWebRequest#method_getacceptablecontenttypes http://www.symfony-project.org/api/1_0/sfWebRequest#method_getacceptablecontenttypes ? Regards, Before Printing, Think about Your Environmental Responsibility! Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale! On Wed, Jan 12, 2011 at 4:51 PM, Dennis gear...@sbcglobal.net wrote: As far as real content negotiation as per the HTTP standard, choosing which one out of an offered, prioritized set of ACCEPT: mime types, I haven't seen anything done in Symfony on any forum, tutorial, etc. There MAY be a native way to to that in Symfony 1, using the config files, but I woulldn't be any money on it. It would be really good question for Favian Ponifier(sp). To me, if it wasn't native to Symfony, iether one, the obvious place to put it would be to extend the Response and its use of the header ACCEPT vs template files. Something almost like a routing file seems natural,where it falls through from highest to lowest availability, but id dynamically ordered. So you'd have an array of available output types, their lower equivilancies, and then a way that parses the ACEPT header to order that array. Probably the coolest way to do it would be to have the template files have the base type in their extension, and then a mimetype in them. You could hve mulitple xml types then, but with specific versions and micoformats. Just a thought. On Jan 12, 6:28 am, Stéphane stephane.er...@gmail.com wrote: In routes.yml, you can define the :sf_format and set its default value I guess. Regards, Before Printing, Think about Your Environmental Responsibility! Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale! On Wed, Jan 12, 2011 at 2:41 PM, Renoir Boulanger r...@evocatio.com wrote: This response is based upon my own memory. It's been a while since I read how to do it. Content type negociation are set in configuration file (view.yml, settings.yml?) and can be specified in actions. Not to forget that you can also use format specific templates e.g.: modules/potato/templates/clients.json.php I cant' recall where I've seen this more in detail hope it helps RENOIR BOULANGER // devLABmtl.org/ ConFoo.ca/ evocatio.com/ (envoyé de mon téléphone) ~ On 2011-01-11, at 16:15, paulkmoore paulkmo...@gmail.com wrote: Hi all I'm new to Symfony and tried posting this in the forum, but I'm not convinced that audience is correct. I am building a REST API for our application, and have been looking at the sfDoctrineRestGeneratorPlugin which looks very promising (and extensible - thanks). However, the library does not appear to provide Content-Type negotiation, which I'd like to use to establish the response format rather than using an extension (.xml, .yaml etc) based approach. Investigating further I am unable to find any content-type negotiation capabilities in Symfony, and am therefore wondering if: i) I've just missed it - please let me know (Note: I've also searched the plug-ins without success) ii) They're isn't any and people build this capability as required (I've previously used the PECL_Http http_negotiate_content_type http://uk3.php.net/manual/en/function.http-negotiate-content-type.php functionality for this purpose) Many thanks Paul -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com symfony-users%2bunsubscr...@googlegroups.comsymfony-users%252bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at
Re: [symfony-users] Taxonomy / Content Categorization using Symfony
Check out the tagging plugin for doctrine.. http://www.symfony-project.org/plugins/sfDoctrineActAsTaggablePlugin I believe it is built by the punk'ave guys. On Tue, Jan 11, 2011 at 23:24, info contact iwant2don...@gmail.com wrote: Hi, I am building a content driven forum website, where I am interested in auto-categorizing content into a taxonomy based on the text of the data. Is there any plugin or any easy way to do with Symfony. I am looking to have my own taxonomy. eg: Books = Computers, Books = Fiction etc.. based on certain keywords that i can define for each. I am also open to a standard taxo with keywords that I can tweak. I found drupal has something inbuilt http://drupal.org/node/774892 Thanks, -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Alex Pilon (613) 608-1480 -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Taxonomy / Content Categorization using Symfony
Just to add ... bear in mind that symfony is not a drupal. Drupal is a CMS system whereas symfony is an MVC framework. Two entirely different things. On Wed, Jan 12, 2011 at 6:24 AM, info contact iwant2don...@gmail.comwrote: Hi, I am building a content driven forum website, where I am interested in auto-categorizing content into a taxonomy based on the text of the data. Is there any plugin or any easy way to do with Symfony. I am looking to have my own taxonomy. eg: Books = Computers, Books = Fiction etc.. based on certain keywords that i can define for each. I am also open to a standard taxo with keywords that I can tweak. I found drupal has something inbuilt http://drupal.org/node/774892 Thanks, -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] No content
Hi, On 01/21/2010 06:01 PM, Eno wrote: Look at your web server error logs. Do you mean there are hosting providers that have error logs for FPT uploading? Javi -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
Re: [symfony-users] No content
Use the dev environment controller as this will show you any error messages generated. For example, if your applications name is frontend you would load http://www.linuxpl.com/frontend_dev.php Also, make sure that permissions of the files on the server are correct and also do a symfony cc on the project to force recreation of the cache files as this can sometimes be incorrect when moving to other servers. On Thu, Jan 21, 2010 at 10:27 PM, Norbert M Haigermoser haigermo...@web.de wrote: Did you re-configure id for the new server environment (config/database.yml etc... ) and a ./symfony doctrine:build --all --all-classes --no-confirmation Am 21.01.2010 um 20:30 schrieb Georg Gell: This happens sometimes when you have a fatal php error in the template (or a method called from the template) Am 21.01.2010 17:24, schrieb Pax95: I've installed a project in my local server - WampServer and it works successfully. I added test content and uploaded it into server (www.linuxpl.com) and it doesn't show anything. -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en. -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en. -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
Re: [symfony-users] No content
And I just went to the link you provided and all looks good On Fri, Jan 22, 2010 at 2:25 PM, Gareth McCumskey gmccums...@gmail.com wrote: Use the dev environment controller as this will show you any error messages generated. For example, if your applications name is frontend you would load http://www.linuxpl.com/frontend_dev.php Also, make sure that permissions of the files on the server are correct and also do a symfony cc on the project to force recreation of the cache files as this can sometimes be incorrect when moving to other servers. On Thu, Jan 21, 2010 at 10:27 PM, Norbert M Haigermoser haigermo...@web.de wrote: Did you re-configure id for the new server environment (config/database.yml etc... ) and a ./symfony doctrine:build --all --all-classes --no-confirmation Am 21.01.2010 um 20:30 schrieb Georg Gell: This happens sometimes when you have a fatal php error in the template (or a method called from the template) Am 21.01.2010 17:24, schrieb Pax95: I've installed a project in my local server - WampServer and it works successfully. I added test content and uploaded it into server (www.linuxpl.com) and it doesn't show anything. -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en. -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en. -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
Re: [symfony-users] No content
On Thu, 21 Jan 2010, Pax95 wrote: I've installed a project in my local server - WampServer and it works successfully. I added test content and uploaded it into server (www.linuxpl.com) and it doesn't show anything. Look at your web server error logs. -- -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
Re: [symfony-users] No content
This happens sometimes when you have a fatal php error in the template (or a method called from the template) Am 21.01.2010 17:24, schrieb Pax95: I've installed a project in my local server - WampServer and it works successfully. I added test content and uploaded it into server (www.linuxpl.com) and it doesn't show anything. -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
Re: [symfony-users] No content
Did you re-configure id for the new server environment (config/ database.yml etc... ) and a ./symfony doctrine:build --all --all-classes --no-confirmation Am 21.01.2010 um 20:30 schrieb Georg Gell: This happens sometimes when you have a fatal php error in the template (or a method called from the template) Am 21.01.2010 17:24, schrieb Pax95: I've installed a project in my local server - WampServer and it works successfully. I added test content and uploaded it into server (www.linuxpl.com) and it doesn't show anything. -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en . -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.