2017 © Pedro Peláez

library core

Modern web framework in PHP for academic environments



Modern web framework in PHP for academic environments

  • Wednesday, December 27, 2017
  • by JASchilz
  • Repository
  • 1 Watchers
  • 1 Stars
  • 353 Installations
  • PHP
  • 12 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 100 Versions
  • 1 % Grown


Build Status Code Climate Test Coverage Latest Stable Version, (*1)


Athens is a modern PHP web framework built within the University of Washington's Department of Enrollment Management., (*2)

Athens in action
Easily create forms and manage submission results in Athens created web applications, (*3)

Applications built within Athens are:, (*4)

  1. Secure, (*5)

    Athens automatically provides strong protection against a number of web attacks, including CSRF, XSS, and database injection., (*6)

    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., (*7)

  2. Attractive, (*8)

    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., (*9)

  3. Legible, (*10)

    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., (*11)

  4. Extensible, (*12)

    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., (*13)

Starting an Application

For help installing Athens and beginning a new application, see the application creation tutorial., (*14)


This library is published on packagist. To install using Composer, add the "athens/core": "0.*" line to your "require" dependencies:, (*15)

    "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., (*16)


Athens uses classes generated by PropelORM to store and retrieve database rows. First, we define a student class in schema.xml:, (*17)

Now we can use Propel to generate a Student instance and create a form which will store the student in the database:, (*18)


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()
    ->addObject(new Student())

$page = PageBuilder::begin()
    ->setTitle("My Project: Enter a Student")
    ->setHeader("My Project")
    ->setSubHeader("Enter a Student")


Add Ons

Additional functionality is provided by the following libraries:, (*19)

  1. Encryption, (*20)

    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., (*21)

    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., (*22)

  2. SendGrid, (*23)

    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., (*24)

    The SendGrid package is not automatically included in your Athens project; you must follow the project instructions to use this package., (*25)

  3. CSRF, (*26)

    The standard Athens template project includes protection from CSRF attacks using the CSRF package. You can find out more by visiting the project documentation., (*27)


  • PHP 5.6, 7.0


See GitHub issue tracker., (*28)

Getting Involved

Feel free to open pull requests or issues. GitHub is the canonical location of this project., (*29)

Here's the general sequence of events for code contribution:, (*30)

  1. Open an issue in the issue tracker.
  2. In any order:
    • Submit a pull request with a failing test that demonstrates the issue/feature.
    • Get acknowledgement/concurrence.
  3. Revise your pull request to pass the test in (2). Include documentation, if appropriate.

PSR-2 compliance is enforced by CodeSniffer in Travis., (*31)

The Versions