feature(webapp): Add support for a basic WebApp Manifest file

Fixes #7493


TODO:
 - [x] Choose a component. i.e. `feature(???)`
 - [x] Actually register the `init()` callback with Elgg
 - [x] Remove the `@flow` annotation
That would be fine too

On Sat, Nov 29, 2014, 5:42 PM Steve Clay <notifications@github.com> wrote:

> In engine/lib/elgglib.php:
>
> > @@ -1900,6 +1900,23 @@ function _elgg_init() {
> >  	elgg_register_page_handler('css', '_elgg_css_page_handler');
> >  	elgg_register_page_handler('ajax', '_elgg_ajax_page_handler');
> >
> > +	elgg_register_page_handler('manifest.json', function() {
> > +		$site = elgg_get_site_entity();
> > +		$resource = new \Elgg\Http\WebAppManifestResource($site);
> > +		header('Content-Type: application/json');
> > +		echo json_encode($resource->get());
> > +		return true;
> > +	});
> > +
> > +	elgg_register_plugin_hook_handler('head', 'page', function($hook, $type, array $result) {
>
> A static method WebAppManifestResource::pageHandler would be a compromise.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/Elgg/Elgg/pull/7531/files#r21057589>.
>