despark / kohana
此包已被废弃,不再维护。未建议替代包。
Kohana项目模板
0.1.2
2014-06-30 10:18 UTC
Requires
- php: >=5.3.7
- ircmaxell/password-compat: ~1.0.3
- kohana/auth: ~3.3.1
- kohana/cache: ~3.3.1
- kohana/core: ~3.3.1
- kohana/database: ~3.3.1
- kohana/image: ~3.3.1
- openbuildings/jam: ~0.4.46
- openbuildings/jam-auth: ~0.2.3
- robmorgan/phinx: ~0.3.0
- symfony/console: ~2.4.0
Suggests
- openbuildings/functest: Functional Test for Kohana with PHPUnit and Spiderling
- openbuildings/jam-closuretable: Closuretable implementation for Jam ORM
- openbuildings/jam-freezable: Freeze dynamic values in the database using Jam
- openbuildings/jam-generated-feed: generate xml files based on a jam collection with a minion task
- openbuildings/jam-locations: Countries and Regions based on Jam and Closuretable
- openbuildings/jam-monetary: A Jam Field to transparently use 'monetary' as a Jam field, and have currency exchange arithmetic out of the box
- openbuildings/jam-resource: Resources for Jam ORM. Resources act as a bridge between routes, models and requests.
- openbuildings/jam-tart: Jam Admin Builder
- openbuildings/jam-taxonomy: Taxonomy terms and vocabularies for Jam
- openbuildings/monetary: Useful tool for formatting and converting currencies
- openbuildings/postmark: Postmark transport for Swift Mailer
- openbuildings/services-manager: Kohana Manager for external Services
- openbuildings/site-versions: Different versions of a Kohana website on different domains
- openbuildings/swiftmailer-css-inliner: Swift Mailer plugin to inline the CSS
- openbuildings/swiftmailer-filter: Swift Mailer plugin to whitelist/blacklist emails/domains
- openbuildings/swiftmailer-google-campaign: Swift Mailer plugin to automatically append Google campaign parameters to all email links
- phpunit/phpunit: The PHP unit testing framework
- swiftmailer/swiftmailer: Comprehensive mailing tools for PHP
This package is not auto-updated.
Last update: 2020-07-03 19:37:14 UTC
README
Kohana项目模板用于Composer
这是我们启动Kohana项目的方式。
创建新项目
要创建名为foobar
的项目,请运行
composer create-project despark/kohana foobar
就这样!您现在拥有了一个带有一些重要模块、CLI工具、权限设置等的Kohana项目!
已安装内容
安装额外的库
您可以运行
composer require <vendor>/<library>:<version_constraint>
这将更新composer.json
中的require
部分,安装库并更新composer.lock
文件。
请参阅composer.json
中的suggest
部分,以获取Kohana模块和其他库的有用列表。
引导
Kohana的引导文件中包含了许多有用的功能。您可以在以下位置查看:bootstrap.php
。
密码哈希
Auth模块中的默认密码哈希使用PHP 5.5 password_hash
。对于PHP <5.5.0的兼容性是通过Anthony Ferrara的password_compat实现的。
数据库配置
Kohana数据库模块基于环境进行配置。默认的数据库名称为项目名称。
迁移
迁移通过phinx完成。配置在phinx.yml中。默认的数据库名称为项目名称。
内部结构
如果您想了解您的项目是如何实际构建的,您应该查看
以下是总结
- 首先,它将根据您提供的名称在文件夹中克隆此仓库。
- 然后,它查找在
composer.json
中的require
和require-dev
部分列出的所有依赖项及其依赖项。 - 下载它们,并将它们放在
vendor/
或modules/
中。 - 然后,它运行
composer.json
中post-create-project-cmd
部分中的脚本。- 创建
application/classes/Model
、application/migrations
和application/views
。 - 使用755权限对
application/migrations
进行chmod
。 - 生成一个随机字符串,并使用它设置
Cookie::$salt
。 - 将
phinx.yml
和application/config/database.php
中的{{DATABASE_NAME}}
替换为项目的名称。
- 创建