webCOMAND

framework::__construct()

Create a webCOMAND framework object, which can be used by packages and apps to leverage webCOMAND UI functionality, such as the webCOMAND login, etc.

The webCOMAND framework will not work properly if the COMAND package router was not initialized yet.  The COMAND package router is automatically initialized to route requests received by the webCOMAND account to the corresponding package, so this is not an issue if this code is called from a typical webCOMAND package or app.

Prototype

framework __construct(repo $repo = NULL)

Parameters

  • repo - Optional repository for the framework to use to access users, etc.  If not specified, a persistent repository connection will be established/reused based on the io_comand_repo Configuration.

Example

<?php
$repo = comand::repo();
$framework = new com_webcomand\framework($repo);
$framework->require_login();

Related

comand::repo()