athens / core
Modern web framework in PHP for academic environments
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-11-09 20:17:43 UTC
README
Athens/Core
Athens is a modern PHP web framework built within the University of Washington's Department of Enrollment Management.
![Athens in action](doc/assets/images/demo.png) *Easily create forms and manage submission results in* Athens *created web applications*
Applications built within Athens are:
- Secure
*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.
- Attractive
*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.
-
Legible
Athens separates declaring what elements shall be on a page from what those elements should look like and the logic of how those elements should behave. Under this model, creating a page is not much more complicated than simply listing the presentational elements that should be present.
-
Extensible
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.
Starting an Application
For help installing Athens and beginning a new application, see the application creation tutorial.
Installation
This library is published on packagist. To install using Composer, add the "athens/core": "0.*"
line to your "require"
dependencies:
{
"require": {
...
"athens/core": "0.*",
...
}
}
Because Athens depends on multiple other libraries, it is highly recommended that you use Composer to install this library and manage dependencies.
Example
Athens uses classes generated by PropelORM to store and retrieve database rows. First, we define a student class in 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>
Now we can use Propel to generate a Student
instance and create a form which will store the student in the database:
<?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();
Add Ons
Additional functionality is provided by the following libraries:
Seamlessly encrypt your sensitive data fields. The Encryption
package is included with your Athens project to keep any table column encrypted while at rest in the database.
Athens projects include the Encryption
package by default; you only have to include a few extra lines in your schema.xml
to add encryption to your models. See the [Encryption
project documentation(/AthensFramework/Encryption/) or the application creation tutorial for an example.
Send your emails via your SendGrid account. With just a couple of extra lines in your settings, your Athens application will send all of its emails via SendGrid.
The SendGrid
package is not automatically included in your Athens project; you must follow the project instructions to use this package.
The standard Athens template project includes protection from CSRF attacks using the CSRF
package. You can find out more by visiting the project documentation.
Compatibility
- PHP 5.6, 7.0
Todo
See GitHub issue tracker.
Getting Involved
Feel free to open pull requests or issues. GitHub is the canonical location of this project.
Here's the general sequence of events for code contribution:
- Open an issue in the issue tracker.
- In any order:
- Submit a pull request with a failing test that demonstrates the issue/feature.
- Get acknowledgement/concurrence.
- Revise your pull request to pass the test in (2). Include documentation, if appropriate.
PSR-2 compliance is enforced by CodeSniffer in Travis.