Download the PHP package groundwork/groundwork-hacklang without Composer

On this page you can find all versions of the php package groundwork/groundwork-hacklang. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package groundwork-hacklang

groundwork-hacklang - A micro-framework for RESTful JSON API development

Build Status

written in (mostly) strict Hack.

This is a rewrite of groundwork, from PHP to mostly strict Hack - "mostly" because there is currently no way to bootstrap Hack code in strict mode (since it doesn't allow top level code), and also due to some reliance on the $_SERVER super global.

groundwork is a lightweight RESTful-like framework that is designed to accept input and output in JSON. It is designed to quickly get a backend communicating with a backbone.js, or equivalent, frontend.

groundwork-hacklang offers the following features:

Examples

In the following example, I'll setup a quick route to respond to the request /articles/199. In app/Config/Routes.php, add:

This will respond with {"id":"199"} in the response body when handed the request /articles/199, and a HTTP status code of 200. This is not HTTP request method specific.

To make a route respond to specific HTTP request methods, you can replace register() with get(), post(), put() or delete(). E.g.:

This would respond to /articles/199 only when the request is a HTTP POST.

Installation

groundwork is designed to have the 'public' directory as the only directory in the package accessible externally. This means that if you're installing groundwork under a VirtualHost in Apache, the web root should point to the 'public' directory (e.g. /var/www/groundwork/public, perhaps). If you're installing groundwork under a sub directory of web root and not as its own virtual host, then you can setup an Apache alias to the public directory to achieve a nicer directory on the web side.

The file app/Config/Config.php contains the baseurl property which you will need to change to reflect where groundwork exists relative to the web root - e.g. if it is installed into http://localhost/bar/, then '/bar/' would be your value for this.

Run composer update from the project root. Groundwork has no inbuilt requirments as far as packages go, but does make use of the Composer class autoloading.

Tests

A basic function test is provided inside app/Tests for the example home resource class. There are also unit tests available in framework/Tests. To run the tests, I've found this command works (from the root groundwork dir):

hhvm $(which phpunit)

License

groundwork-hacklang is open-sourced software licensed under the MIT License.


All versions of groundwork-hacklang with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package groundwork/groundwork-hacklang contains the following files

Loading the files please wait ....