Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.
If the asker does not get an answer then they have 10 days to request a refund.
$5
How do I get the sfYaml functionality in code outside of Symfony?
Fabien Potencier has written about making the Symfony components easy to include in projects outside of Symfony. How is this done?
The Symfony project is version 1.2.5
Lawrence Krubner | 11/27/10 at 11:18pm
Edit
Tutorial: How to assign prize money
(4) Possible Answers Submitted...
See a chronological view of answers?
Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.
-

Last edited:
11/28/10
12:54am -

Last edited:
11/28/10
6:56amJakub Zalas says:You just need to require sfYaml class and you're ready to go!
require_once '/path/to/your/symfony/lib/yaml/sfYaml.php';
$databaseConfigFile = '/path/to/your/project/config/databases.yml';
$databaseConfig = sfYaml::load($databaseConfigFile);
-

Last edited:
11/28/10
12:15pmJuG says:Hi,
please refer to http://components.symfony-project.org/yaml/ for downloading, installing and using thee sfYaml component.
Shortly it's easy as :
<?php
// Download and extract somewhere sfYaml from http://components.symfony-project.org/
require_once 'path/to/sfYaml.php';
$array = = sfYaml::load('/path/to/file.yml');
Good luck,
PS : see as well those classes :
* http://www.symfony-project.org/api/1_4/sfYamlConfigHandler
* http://www.symfony-project.org/api/1_4/sfDatabaseConfigHandler -

Last edited:
11/30/10
11:31pmLoban Rahman says:If your chat application is severely tied with your symfony application (and may want to use more stuff from symfony 1.2/1.4 then just the yaml data), then use Jakub's solution. Otherwise, use the standalone Yaml component from the Symfony2 project, as JuG has said.
This question has expired.
Current status of this question: Community pot
Please log in to add additional discourse to this page.
Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.
If the asker does not get an answer then they have 10 days to request a refund.
