-
Notifications
You must be signed in to change notification settings - Fork 2
/
ProjectConfiguration.class.php
49 lines (38 loc) · 1.93 KB
/
ProjectConfiguration.class.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
require_once '/home/u99926/uberlovru/symfony-1.4.10/lib/autoload/sfCoreAutoload.class.php';
sfCoreAutoload::register();
class ProjectConfiguration extends sfProjectConfiguration {
static protected $zendLoaded = false;
static public function registerZend() {
if (self::$zendLoaded) {
return;
}
set_include_path(sfConfig::get('sf_lib_dir') . '/vendor' . PATH_SEPARATOR . get_include_path());
require_once sfConfig::get('sf_lib_dir') . '/vendor/Zend/Loader/Autoloader.php';
Zend_Loader_Autoloader::getInstance();
Zend_Search_Lucene_Search_QueryParser::setDefaultEncoding('utf-8');
Zend_Search_Lucene_Analysis_Analyzer::setDefault(
new Zend_Search_Lucene_Analysis_Analyzer_Common_Utf8_CaseInsensitive()
);
self::$zendLoaded = true;
}
public function setup() {
require_once sfConfig::get('sf_lib_dir') . DIRECTORY_SEPARATOR . 'FirePHP' . DIRECTORY_SEPARATOR . 'fb.php';
$this->enablePlugins('sfDoctrinePlugin');
$this->enablePlugins('sfDoctrineGuardPlugin');
$this->enablePlugins('sfDoctrineActAsTaggablePlugin');
$this->enablePlugins('sfJqueryReloadedPlugin');
$this->enablePlugins('sfThumbnailPlugin');
$this->enablePlugins('sfForkedDoctrineApplyPlugin');
$this->enablePlugins('sfXssSafePlugin');
$this->enablePlugins('sfJqueryFormValidationPlugin');
$this->enablePlugins('swFunctionalTestGenerationPlugin');
}
public function setWebDir($webDir) {
sfConfig::add(array(
'sf_web_dir' => $this->getRootDir() . DIRECTORY_SEPARATOR . 'www',
'sf_upload_dir' => $this->getRootDir() . DIRECTORY_SEPARATOR . 'www' . DIRECTORY_SEPARATOR . 'uploads',
'sf_user_pic_dir' => $this->getRootDir() . DIRECTORY_SEPARATOR . 'www' . DIRECTORY_SEPARATOR . 'images' . DIRECTORY_SEPARATOR . 'userpic' . DIRECTORY_SEPARATOR,
));
}
}