uwdoem / framework
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.50
- 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: 2019-02-20 18:43:24 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安装,请在您的"require"
依赖关系中添加"athens/core": "0.*"
行。
{
"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项目中,以确保数据库中任何表列在休息时都加密。
Athens项目默认包含Encryption
包;您只需要在schema.xml
中添加几行额外的代码即可将加密添加到您的模型中。请参阅[加密项目文档(/AthensFramework/Encryption/)或应用程序创建教程。
通过您的SendGrid账户发送电子邮件。通过在设置中添加几行额外的代码,您的Athens应用程序将通过SendGrid发送所有电子邮件。
SendGrid包不是自动包含在您的Athens项目中的;您必须按照项目说明使用此包。
标准的Athens模板项目通过CSRF包提供对CSRF攻击的保护。您可以通过访问项目文档了解更多信息。
兼容性
- PHP 5.6, 7.0
待办事项
请参阅GitHub 问题跟踪器。
参与进来
请随意提交拉取请求或问题。此项目的规范位置是 GitHub。
以下是代码贡献的一般事件顺序
- 在 问题跟踪器 中开启一个问题。
- 不分先后顺序
- 提交一个带有 失败的 测试的拉取请求,以演示问题/功能。
- 获取确认/同意。
- 修订您的拉取请求以通过(2)中的测试。如果适当,包括文档。
PSR-2 合规性由 Travis 中的 CodeSniffer 强制执行。