2017 © Pedro Pelรกez
 

library coast

Web application framework for PHP

image

jacksleight/coast

Web application framework for PHP

  • Tuesday, June 19, 2018
  • by jacksleight
  • Repository
  • 4 Watchers
  • 7 Stars
  • 585 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 5 Open issues
  • 26 Versions
  • 6 % Grown

The README.md

Coast

Packagist Travis Coverage Status License, (*1)

Coast is a web application framework. The goal of Coast is to provide a simple, lightweight and flexible framework for building high-performance, modern web apps. Some parts of the API were inspired by the Connect and Express node.js frameworks, others are my own (possibly ridiculous) ideas., (*2)

All feedback, suggestions, bug reports and contributions are very welcome. Please feel free to get in touch by email (jacksleight at gmail dot com) or @jacksleight on Twitter., (*3)

The documentation, examples and tests are still a work in progress (sorry). Until there's a 1.0 release any new version may introduce backwards compatibility breaks., (*4)

Components

All components are designed to be as standalone as possible and can generally be used independently. Many implement App\Executable for use as middleware in applications, these are marked with a โ˜…., (*5)

  • Acl
    • Access control list
  • App, Request, Response โ˜…
    • Simple Express inspired application logic
    • HTTP request and response data handling
    • Lazy loading of application dependencies
    • Sub-applications
  • Config
    • Load and merge config files into config object
  • Controller โ˜…
    • Request controller
  • Csp โ˜…
    • Content security policy header generation
    • Generation of nonce values
  • Csrf โ˜…
    • Cross site request forgery protection
  • Feed
    • ATOM feed generation
  • Filter
    • Data filtering
  • Http
    • HTTP client (based on cURL)
  • Image โ˜…
  • Lazy โ˜…
    • Lazy load files/closures on demand
  • Model, Collection
    • Base entity and entity collection classs
    • Works with Filter, Transformer, Validator
  • Path, Dir, File
    • Path, directory and file manipulation
  • Resolver
    • Resolves strings, files, routes etc. into URLs
  • Router โ˜…
    • Path and method routing
  • Session โ˜…
    • Session management and data wrapper
  • Sitemap
    • XML sitemap generation
  • Transformer
    • Data transformation
  • Url
    • URL manipulation
  • Validator
    • Data validation
  • View โ˜…
    • Powerfull view component
    • Child and parent (wrapper) views
    • Extensible views
    • Output capture
  • Xml
    • SimpleXML extensions

Installation

The easiest way to install Coast is through Composer, by creating a file called composer.json containing:, (*6)

{
    "require": {
        "jacksleight/coast": "dev-master"
    }
}

And then running:, (*7)

composer.phar install

Hello World

Create a new file called app.php containing:, (*8)

<?php
use Coast\App;
use Coast\Request;
use Coast\Response;

require __DIR__ . '/vendor/autoload.php';

$app = new App(__DIR__);
$app->executable(function(Request $req, Response $res) {
    return $res->text('Hello World');
});

$app->execute();

Then run:, (*9)

php -S localhost:8000 app.php

And load it up in the browser at: http://localhost:8000/., (*10)

What's happening here?

  1. Include the Composer autoloader.
  2. Initialise a Coast\App object.
  3. Add middleware to handle the request.
  4. Call execute to run the application.

Documentation

Requirements

  • PHP 5.6+
  • mod_rewrite (if using Apache)

To Do

  • Examples (in progress)
  • API documentation (in progress)
  • Tests (in progress)

Licence

The MIT License, (*11)

Copyright 2019 Jack Sleight http://jacksleight.com/, (*12)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:, (*13)

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software., (*14)

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE., (*15)

The Versions

19/06 2018

dev-dev

dev-dev http://coast.jacksleight.com/

Web application framework for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jack Sleight

framework coast

23/04 2018

dev-master

9999999-dev http://coast.jacksleight.com/

Web application framework for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jack Sleight

framework coast

23/04 2018

0.7.6

0.7.6.0 http://coast.jacksleight.com/

Web application framework for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jack Sleight

framework coast

23/04 2018

0.7.5

0.7.5.0 http://coast.jacksleight.com/

Web application framework for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jack Sleight

framework coast

09/03 2018

0.7.4

0.7.4.0 http://coast.jacksleight.com/

Web application framework for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jack Sleight

framework coast

01/09 2017

0.7.3

0.7.3.0 http://coast.jacksleight.com/

Web application framework for PHP 5.5+

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jack Sleight

framework coast

25/08 2017

0.7.2

0.7.2.0 http://coast.jacksleight.com/

Web application framework for PHP 5.5+

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jack Sleight

framework coast

09/08 2017

0.7.1

0.7.1.0 http://coast.jacksleight.com/

Web application framework for PHP 5.5+

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jack Sleight

framework coast

07/08 2017

0.7.0

0.7.0.0 http://coast.jacksleight.com/

Web application framework for PHP 5.5+

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jack Sleight

framework coast

06/06 2017

0.6.4

0.6.4.0 http://coast.jacksleight.com/

Web application framework for PHP 5.5+

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jack Sleight

framework coast

08/05 2017

0.6.3

0.6.3.0 http://coast.jacksleight.com/

Web application framework for PHP 5.5+

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jack Sleight

framework coast

14/03 2017

0.6.2

0.6.2.0 http://coast.jacksleight.com/

Web application framework for PHP 5.5+

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jack Sleight

framework coast

13/01 2017

0.6.1

0.6.1.0 http://coast.jacksleight.com/

Web application framework for PHP 5.5+

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jack Sleight

framework coast

11/01 2017

0.6.0

0.6.0.0 http://coast.jacksleight.com/

Web application framework for PHP 5.5+

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jack Sleight

framework coast

25/07 2016

0.5.4

0.5.4.0 http://coast.jacksleight.com/

Web application framework for PHP 5.5+

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jack Sleight

framework coast

23/11 2015

0.5.3

0.5.3.0 http://coast.jacksleight.com/

Web application framework for PHP 5.5+

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jack Sleight

framework coast

11/11 2015

0.5.2

0.5.2.0 http://coast.jacksleight.com/

Web application framework for PHP 5.5+

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jack Sleight

framework coast

10/11 2015

0.5.1

0.5.1.0 http://coast.jacksleight.com/

Web application framework for PHP 5.5+

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jack Sleight

framework coast

22/10 2015

0.5.0

0.5.0.0 http://coast.jacksleight.com/

Web application framework for PHP 5.5+

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jack Sleight

framework coast

10/06 2015

0.4.1

0.4.1.0 http://coast.jacksleight.com/

Web application framework for PHP 5.5+

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jack Sleight

framework coast

16/04 2015

0.4.0

0.4.0.0 http://coast.jacksleight.com/

Web application framework for PHP 5.5+

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jack Sleight

framework coast

02/02 2015

0.3.0

0.3.0.0 http://coast.jacksleight.com/

Web application framework for PHP 5.5+

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jack Sleight

framework coast

01/12 2014

0.2.0

0.2.0.0 http://coast.jacksleight.com/

Web application framework for PHP 5.5+

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

The Development Requires

by Jack Sleight

framework coast

30/10 2014

0.1.0

0.1.0.0 http://coast.jacksleight.com/

Web application framework for PHP 5.5+

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

The Development Requires

by Jack Sleight

framework coast

28/02 2014

v0.1.0-alpha2

0.1.0.0-alpha2 http://coastphp.com/

Web application framework for PHP 5.5+

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

The Development Requires

by Jack Sleight

framework connect express coast

16/02 2014

v0.1.0-alpha1

0.1.0.0-alpha1 http://coastphp.com/

Web application framework for PHP 5.5+

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

The Development Requires

by Jack Sleight

framework connect express coast