Development

/branches/1.3/lib/plugins/sfDoctrinePlugin/lib/database/sfDoctrineConnectionListener.class.php

You must first sign up to be able to contribute.

root/branches/1.3/lib/plugins/sfDoctrinePlugin/lib/database/sfDoctrineConnectionListener.class.php

Revision 23810, 0.9 kB (checked in by Kris.Wallsmith, 5 years ago)

[1.3] set svn:eol-style property to native and svn:keywords property to Id on all .php files

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
Line 
1 <?php
2
3 /*
4  * This file is part of the symfony package.
5  * (c) Fabien Potencier <fabien.potencier@symfony-project.com>
6  * (c) Jonathan H. Wage <jonwage@gmail.com>
7  *
8  * For the full copyright and license information, please view the LICENSE
9  * file that was distributed with this source code.
10  */
11
12 /**
13  * Standard connection listener
14  *
15  * @package    symfony
16  * @subpackage doctrine
17  * @author     Fabien Potencier <fabien.potencier@symfony-project.com>
18  * @author     Jonathan H. Wage <jonwage@gmail.com>
19  * @version    SVN: $Id$
20  */
21 class sfDoctrineConnectionListener extends Doctrine_EventListener
22 {
23   public function __construct($connection, $encoding)
24   {
25     $this->connection = $connection;
26     $this->encoding = $encoding;
27   }
28
29   public function postConnect(Doctrine_Event $event)
30   {
31     $this->connection->setCharset($this->encoding);
32     $this->connection->setDateFormat();
33   }
34 }
Note: See TracBrowser for help on using the browser.