# shiftcontroller/trunk/sh4/feed/boot.php

ShiftController Employee Shift Scheduling, version trunk. 30 lines.

- Page: https://pluginprobe.com/plugins/shiftcontroller/trunk/code/sh4/feed/boot.php
- Raw: https://pluginprobe.com/plugins/shiftcontroller/trunk/raw/sh4/feed/boot.php
- Modified: 2021-03-13T08:04:04+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/shiftcontroller/trunk/code/sh4/feed/boot.php#L10-L20`.

```php
<?php if (! defined('ABSPATH')) exit; // Exit if accessed directly
class SH4_Feed_Boot
{
	public function __construct(
		HC3_Hooks $hooks,
		HC3_Router $router
	)
	{
		$hooks
			->add( 'sh4/app/html/view/admin::menu::after', function( $ret ){
				$ret['41-admin/feed'] = array( 'admin/feed', '__Shifts Feed__' );
				return $ret;
			})
			;

		$router
			->register( 'get:feed/{token}', array('SH4_Feed_View', 'render') )
			->register( 'get:feed/{token}/{calendar}', array('SH4_Feed_View', 'render') )
			->register( 'get:feed/{token}/{calendar}/{employee}', array('SH4_Feed_View', 'render') )
			->register( 'get:feed/{token}/{calendar}/{employee}/{from}/{to}', array('SH4_Feed_View', 'render') )

			->register( 'get:json/{token}', array('SH4_Feed_View', 'renderJson') )
			->register( 'get:json/{token}/{calendar}', array('SH4_Feed_View', 'renderJson') )
			->register( 'get:json/{token}/{calendar}/{employee}', array('SH4_Feed_View', 'renderJson') )
			->register( 'get:json/{token}/{calendar}/{employee}/{from}/{to}', array('SH4_Feed_View', 'renderJson') )

			->register( 'get:admin/feed', array('SH4_Feed_Html_Admin_Feed', 'render') )
			;
	}
}
```
