Skip to content

Commit b392a55

Browse files
committed
Generate project (ORM uses Propel)
1 parent f88211d commit b392a55

16 files changed

+251
-0
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
/cache/
12
/lib/vendor/
3+
/log/

README.md

+12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
11
# Symfony Framework v1
22

33
https://symfony.com/legacy
4+
5+
## Install symfony 1.x
6+
7+
symfony 1.x legacy versions をダウンロードし、`lib/vendor`ディレクトリに保存する。
8+
9+
```
10+
$ php lib/vendor/symfony/data/bin/symfony -V
11+
```
12+
13+
```
14+
$ php lib/vendor/symfony/data/bin/check_configuration.php
15+
```

config/ProjectConfiguration.class.php

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
require_once dirname(__FILE__).'/../lib/vendor/symfony/lib/autoload/sfCoreAutoload.class.php';
4+
sfCoreAutoload::register();
5+
6+
class ProjectConfiguration extends sfProjectConfiguration
7+
{
8+
public function setup()
9+
{
10+
$this->enablePlugins('sfPropelPlugin');
11+
}
12+
}

config/databases.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# You can find more information about this file on the symfony website:
2+
# http://www.symfony-project.org/reference/1_4/en/07-Databases
3+
4+
dev:
5+
propel:
6+
param:
7+
classname: DebugPDO
8+
debug:
9+
realmemoryusage: true
10+
details:
11+
time: { enabled: true }
12+
slow: { enabled: true, threshold: 0.1 }
13+
mem: { enabled: true }
14+
mempeak: { enabled: true }
15+
memdelta: { enabled: true }
16+
17+
test:
18+
propel:
19+
param:
20+
classname: DebugPDO
21+
22+
all:
23+
propel:
24+
class: sfPropelDatabase
25+
param:
26+
classname: PropelPDO
27+
dsn: mysql:dbname=jobeet;host=localhost
28+
username: root
29+
password:
30+
encoding: utf8
31+
persistent: true
32+
pooling: true

config/propel.ini

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
propel.targetPackage = lib.model
2+
propel.packageObjectModel = true
3+
propel.project = jobeet
4+
propel.database = mysql
5+
propel.database.driver = mysql
6+
propel.database.url = mysql:dbname=jobeet;host=localhost
7+
propel.database.creole.url = ${propel.database.url}
8+
propel.database.user = root
9+
propel.database.password =
10+
propel.database.encoding = utf8
11+
12+
; mysql options
13+
propel.mysql.tableType = InnoDB
14+
15+
propel.addVendorInfo = true
16+
propel.addGenericAccessors = true
17+
propel.addGenericMutators = true
18+
propel.addTimeStamp = true
19+
propel.addValidators = false
20+
propel.addIncludes = false
21+
22+
propel.useDateTimeClass = true
23+
propel.defaultTimeStampFormat = Y-m-d H:i:s
24+
propel.defaultTimeFormat = H:i:s
25+
propel.defaultDateFormat = Y-m-d
26+
27+
propel.schema.validate = false
28+
propel.samePhpName = false
29+
propel.disableIdentifierQuoting = false
30+
propel.emulateForeignKeyConstraints = true
31+
32+
; directories
33+
propel.home = .
34+
propel.output.dir = /var/www/html
35+
propel.schema.dir = ${propel.output.dir}/config
36+
propel.conf.dir = ${propel.output.dir}/config
37+
propel.phpconf.dir = ${propel.output.dir}/config
38+
propel.sql.dir = ${propel.output.dir}/data/sql
39+
propel.runtime.conf.file = runtime-conf.xml
40+
propel.php.dir = ${propel.output.dir}
41+
propel.default.schema.basename = schema
42+
propel.datadump.mapper.from = *schema.xml
43+
propel.datadump.mapper.to = *data.xml
44+
45+
propel.builder.addComments = true
46+
propel.builder.addBehaviors = true
47+
48+
; behaviors
49+
propel.behavior.default = symfony,symfony_i18n
50+
propel.behavior.symfony.class = plugins.sfPropelPlugin.lib.behavior.SfPropelBehaviorSymfony
51+
propel.behavior.symfony_i18n.class = plugins.sfPropelPlugin.lib.behavior.SfPropelBehaviorI18n
52+
propel.behavior.symfony_i18n_translation.class = plugins.sfPropelPlugin.lib.behavior.SfPropelBehaviorI18nTranslation
53+
propel.behavior.symfony_behaviors.class = plugins.sfPropelPlugin.lib.behavior.SfPropelBehaviorSymfonyBehaviors
54+
propel.behavior.symfony_timestampable.class = plugins.sfPropelPlugin.lib.behavior.SfPropelBehaviorTimestampable

config/properties.ini

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[symfony]
2+
name=jobeet
3+
author=Your name here
4+
orm=Propel

config/rsync_exclude.txt

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Project files
2+
/cache/*
3+
/log/*
4+
/web/*_dev.php
5+
/web/uploads/*
6+
7+
# SCM files
8+
.arch-params
9+
.bzr
10+
_darcs
11+
.git
12+
.hg
13+
.monotone
14+
.svn
15+
CVS

config/schema.yml

Whitespace-only changes.

data/fixtures/fixtures.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# # Populate this file with data to be loaded by your ORM's *:data-load task.
2+
# # You can create multiple files in this directory (i.e. 010_users.yml,
3+
# # 020_articles.yml, etc) which will be loaded in alphabetical order.
4+
# #
5+
# # See documentation for your ORM's *:data-load task for more information.
6+
#
7+
# User:
8+
# fabien:
9+
# username: fabien
10+
# password: changeme
11+
# name: Fabien Potencier
12+
13+
# kris:
14+
# username: Kris.Wallsmith
15+
# password: changeme
16+
# name: Kris Wallsmith
17+

lib/form/BaseForm.class.php

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
/**
4+
* Base project form.
5+
*
6+
* @package jobeet
7+
* @subpackage form
8+
* @author Your name here
9+
* @version SVN: $Id: BaseForm.class.php 20147 2009-07-13 11:46:57Z FabianLange $
10+
*/
11+
class BaseForm extends sfFormSymfony
12+
{
13+
}

symfony

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env php
2+
<?php
3+
4+
/*
5+
* This file is part of the symfony package.
6+
* (c) Fabien Potencier <[email protected]>
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+
chdir(dirname(__FILE__));
13+
require_once(dirname(__FILE__).'/config/ProjectConfiguration.class.php');
14+
include(sfCoreAutoload::getInstance()->getBaseDir().'/command/cli.php');

test/bootstrap/functional.php

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the symfony package.
5+
* (c) 2004-2006 Fabien Potencier <[email protected]>
6+
*
7+
* For the full copyright and license information, please view the LICENSE
8+
* file that was distributed with this source code.
9+
*/
10+
11+
// guess current application
12+
if (!isset($app))
13+
{
14+
$traces = debug_backtrace();
15+
$caller = $traces[0];
16+
17+
$dirPieces = explode(DIRECTORY_SEPARATOR, dirname($caller['file']));
18+
$app = array_pop($dirPieces);
19+
}
20+
21+
require_once dirname(__FILE__).'/../../config/ProjectConfiguration.class.php';
22+
$configuration = ProjectConfiguration::getApplicationConfiguration($app, 'test', isset($debug) ? $debug : true);
23+
sfContext::createInstance($configuration);
24+
25+
// remove all cache
26+
sfToolkit::clearDirectory(sfConfig::get('sf_app_cache_dir'));

test/bootstrap/unit.php

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the symfony package.
5+
* (c) Fabien Potencier <[email protected]>
6+
*
7+
* For the full copyright and license information, please view the LICENSE
8+
* file that was distributed with this source code.
9+
*/
10+
11+
$_test_dir = realpath(dirname(__FILE__).'/..');
12+
13+
// configuration
14+
require_once dirname(__FILE__).'/../../config/ProjectConfiguration.class.php';
15+
$configuration = ProjectConfiguration::hasActive() ? ProjectConfiguration::getActive() : new ProjectConfiguration(realpath($_test_dir.'/..'));
16+
17+
// autoloader
18+
$autoload = sfSimpleAutoload::getInstance(sfConfig::get('sf_cache_dir').'/project_autoload.cache');
19+
$autoload->loadConfiguration(sfFinder::type('file')->name('autoload.yml')->in(array(
20+
sfConfig::get('sf_symfony_lib_dir').'/config/config',
21+
sfConfig::get('sf_config_dir'),
22+
)));
23+
$autoload->register();
24+
25+
// lime
26+
include $configuration->getSymfonyLibDir().'/vendor/lime/lime.php';

web/.htaccess

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Options +FollowSymLinks +ExecCGI
2+
3+
<IfModule mod_rewrite.c>
4+
RewriteEngine On
5+
6+
# uncomment the following line, if you are having trouble
7+
# getting no_script_name to work
8+
#RewriteBase /
9+
10+
# we skip all files with .something
11+
#RewriteCond %{REQUEST_URI} \..+$
12+
#RewriteCond %{REQUEST_URI} !\.html$
13+
#RewriteRule .* - [L]
14+
15+
# we check if the .html version is here (caching)
16+
RewriteRule ^$ index.html [QSA]
17+
RewriteRule ^([^.]+)$ $1.html [QSA]
18+
RewriteCond %{REQUEST_FILENAME} !-f
19+
20+
# no, so we redirect to our front web controller
21+
RewriteRule ^(.*)$ index.php [QSA,L]
22+
</IfModule>

web/css/main.css

Whitespace-only changes.

web/robots.txt

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#User-agent: *
2+
#Disallow:

0 commit comments

Comments
 (0)