athens / core
适用于学术环境的现代PHP网络框架
Requires
- athens/csrf: 2.*
- dompdf/dompdf: 0.7.*
- phpoffice/phpexcel: 1.*
- twig/twig: 1.*
Requires (Dev)
- athens/standard: *
- codeclimate/php-test-reporter: dev-master
- evert/phpdoc-md: ~0.2.0
- phpdocumentor/phpdocumentor: 2.*
- phpunit/phpunit: 5.*
- squizlabs/php_codesniffer: 2.*
- dev-master
- 0.35.3
- 0.34.2
- 0.34.1
- 0.34.0
- 0.33.0
- 0.32.5
- 0.32.4
- 0.32.3
- 0.32.2
- 0.32.1
- 0.32.0
- 0.31.0
- 0.30.7
- 0.30.6
- 0.30.5
- 0.30.4
- 0.30.3
- 0.30.2
- 0.30.1
- 0.30.0
- 0.29.34
- 0.29.33
- 0.29.32
- 0.29.31
- 0.29.30
- 0.29.29
- 0.29.28
- 0.29.27
- 0.29.26
- 0.29.25
- 0.29.24
- 0.29.23
- 0.29.22
- 0.29.21
- 0.29.20
- 0.29.10
- 0.29.9
- 0.29.8
- 0.29.7
- 0.29.6
- 0.29.5
- 0.29.4
- 0.29.3
- 0.29.2
- 0.29.1
- 0.29.0
- 0.28.5
- 0.28.4
- 0.28.3
- 0.28.2
- 0.28.1
- 0.28.0
- 0.27.0
- 0.26.9
- 0.26.8
- 0.26.7
- 0.26.6
- 0.26.5
- 0.26.4
- 0.26.3
- 0.26.2
- 0.26.1
- 0.26.0
- 0.25.0
- 0.24.3
- 0.24.2
- 0.24.1
- 0.23.1
- 0.22.3
- 0.22.2
- 0.22.1
- 0.21.1
- 0.20.1
- 0.19.1
- 0.18.1
- 0.17.1
- 0.16.0
- 0.15.0
- 0.14.0
- 0.13.0
- 0.12.2
- 0.12.1
- 0.11.1
- 0.10.2
- 0.10.1
- 0.9.3
- 0.9.2
- 0.9.1
- 0.8.1
- 0.8.0
- 0.7.0
- 0.6.0
- 0.5.3
- 0.5.2
- 0.5.1
- 0.5.0
- 0.4.4
- 0.4.3
- 0.4.2
- 0.4.1
- 0.4.0
- 0.3.46
- 0.3.45
- 0.3.44
- 0.3.43
- 0.3.42
- 0.3.41
- 0.3.40
- 0.3.39
- 0.3.38
- 0.3.37
- 0.3.36
- 0.3.35
- 0.3.34
- 0.3.33
- 0.3.32
- 0.3.31
- 0.3.30
- 0.3.29
- 0.3.28
- 0.3.27
- 0.3.26
- 0.3.25
- 0.3.24
- 0.3.23
- 0.3.22
- 0.3.21
- 0.3.20
- 0.3.19
- 0.3.18
- 0.3.17
- 0.3.16
- 0.3.15
- 0.3.14
- 0.3.13
- 0.3.12
- 0.3.11
- 0.3.10
- 0.3.9
- 0.3.8
- 0.3.7
- 0.3.6
- 0.3.5
- 0.3.4
- 0.3.3
- 0.3.2
- 0.3.1
- 0.3.0
- 0.2.49
- 0.2.48
- 0.2.47
- 0.2.46
- 0.2.45
- 0.2.43
- 0.2.42
- 0.2.41
- 0.2.40
- 0.2.39
- 0.2.38
- 0.2.37
- 0.2.36
- 0.2.35
- 0.2.34
- 0.2.33
- 0.2.32
- 0.2.30
- 0.2.29
- 0.2.28
- 0.2.27
- 0.2.26
- 0.2.25
- 0.2.24
- 0.2.23
- 0.2.20
- 0.2.19
- 0.2.18
- 0.2.17
- 0.2.16
- 0.2.15
- 0.2.14
- 0.2.13
- 0.2.12
- 0.2.11
- 0.2.10
- 0.2.9
- 0.2.8
- 0.2.7
- 0.2.5
- 0.2.4
- 0.2.3
- 0.2.2
- 0.2.1
- 0.1.9
- 0.1.8
- 0.1.7
- 0.1.6
- 0.1.5
- 0.1.4
- 0.1.3
- 0.1.2
- 0.1.1
This package is not auto-updated.
Last update: 2024-09-14 19:36:37 UTC
README
Athens/Core
Athens 是一个在现代华盛顿大学招生管理系内部构建的现代PHP网络框架。
 *在 Athens 创建的 Web 应用程序中轻松创建表单和管理提交结果*
在 Athens 中构建的应用程序
- 安全
*Athens* automatically provides strong protection against a number of web attacks, including CSRF, XSS, and database injection.
*Athens* also provides easy, seamless encryption for sensitive student information. Encrypting a database column requires a simple declaration in your model schema for each data-field you want to protect. Calls to and from the database on that encrypted data are transparent; *Athens* knows which fields are encrypted and handles the encryption/decryption behind the scenes.
- 吸引人
*Athens* includes beautiful page templates and user-interface elements. These default templates can be easily overridden with custom themes to implement your own organization's brand.
-
易读
Athens 将页面上的元素声明与元素的外观以及元素的逻辑行为分离。在这个模型下,创建页面并不比列出应存在的展示元素复杂多少。
-
可扩展
This separation of concerns also promotes reusability of components: a web-displayed table can be turned into Excel by changing a single line of code; a web-displayed form can be presented as a PDF by changing a single line of code. Adding a column to a table takes only one line, and in most cases *Athens* will be able to populate that column from the database without any further instruction.
开始一个应用程序
有关安装 Athens 并开始新应用程序的帮助,请参阅 应用程序创建教程。
安装
此库已在 Packagist 上发布。要使用 Composer 安装,请将 "athens/core": "0.*"
行添加到您的 "require"
依赖项中
{
"require": {
...
"athens/core": "0.*",
...
}
}
由于 Athens 依赖于多个其他库,因此强烈建议您使用 Composer 安装此库并管理依赖项。
示例
Athens 使用由 PropelORM 生成的类来存储和检索数据库行。首先,我们在 schema.xml 中定义一个学生类
<table name="student">
<column name="id" type="integer" required="true" primaryKey="true" autoIncrement="true"/>
<column name="uw_student_number" type="varchar" size="7" required="true" phpName="UWStudentNumber"/>
<column name="first_name" type="varchar" size="127" required="true"/>
<column name="middle_initial" type="varchar" size="15" required="true"/>
<column name="last_name" type="varchar" size="127" required="true"/>
<column name="last_four_ssn" type="varchar" size="4" required="true"/>
</table>
现在我们可以使用 Propel 来生成一个 Student
实例并创建一个将学生在数据库中存储的表单
<?php
require_once dirname(__FILE__) ."/../setup.php";
use Athens\Core\Form\FormBuilder;
use Athens\Core\Page\PageBuilder;
use Athens\Core\Page\Page;
use MyProject\Student;
$form = FormBuilder::begin()
->setId("student-form")
->addObject(new Student())
->build();
$page = PageBuilder::begin()
->setId('student-submission-page')
->setType(Page::PAGE_TYPE_FULL_HEADER)
->setTitle("My Project: Enter a Student")
->setHeader("My Project")
->setSubHeader("Enter a Student")
->setBaseHref("..")
->setWritable($form)
->build();
$page->render();
附加功能
以下库提供了附加功能
无缝加密您的敏感数据字段。默认情况下,Athens 项目包括 Encryption
包,以在数据库中静止时加密任何表列。
Athens 项目默认包含 Encryption
包;您只需在 schema.xml
中添加几行即可将加密添加到您的模型中。请参阅 [Encryption
项目文档(/AthensFramework/Encryption/)或应用程序创建教程以获取示例。
通过您的 SendGrid 账户发送电子邮件。通过在设置中添加几行额外的代码,您的 Athens 应用程序将通过 SendGrid 发送所有电子邮件。
默认情况下,SendGrid
包不包括在您的 Athens 项目中;您必须按照项目说明使用此包。
Athens 模板项目标准包括使用 CSRF
包对 CSRF 攻击的保护。您可以访问项目文档了解更多信息。
兼容性
- PHP 5.6, 7.0
待办事项
请参阅 GitHub 问题跟踪器。
参与
请随意打开拉取请求或问题。 GitHub 是此项目的规范位置。
以下是代码贡献的一般事件序列
- 在 问题跟踪器 中打开一个问题。
- 任何顺序
- 提交一个带有 失败的 测试的拉取请求,以演示问题/功能。
- 获得确认/同意。
- 修改您的拉取请求以通过(2)中的测试。如果适当,包括文档。
PSR-2 符合性由 Travis 中的 CodeSniffer 强制执行。