Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F56942931
ApplicationContext.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
ApplicationContext.php
View Options
<?php
/**
* _, __, _, _ __, _ _, _, _
* / \ |_) (_ | | \ | /_\ |\ |
* \ / |_) , ) | |_/ | | | | \|
* ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
*
* Application context class
*
* @package ObsidianWorkspaces
* @subpackage Apps
* @author Sébastien Santoro aka Dereckson <dereckson@espace-win.org>
* @license http://www.opensource.org/licenses/bsd-license.php BSD
* @filesource
*/
namespace
Waystone\Workspaces\Engines\Apps
;
use
Waystone\Workspaces\Engines\Framework\Context
;
/**
* Application context class
*
* This class describes an application context, in addition to the site context.
*/
class
ApplicationContext
extends
Context
{
/**
* @var ApplicationConfiguration the application configuration
*/
public
$configuration
;
/**
* Initializes a new ApplicationContext instance from a Context instance
*
* @param Context $sourceContext The source context
* @param ApplicationConfiguration The application configuration
* (facultative)
*/
public
static
function
loadFromContext
(
$sourceContext
,
$applicationConfiguration
=
null
)
{
$applicationContext
=
new
ApplicationContext
();
$applicationContext
->
workspace
=
$sourceContext
->
workspace
;
$applicationContext
->
user
=
$sourceContext
->
user
;
$applicationContext
->
session
=
$sourceContext
->
session
;
$applicationContext
->
url
=
$sourceContext
->
url
;
$applicationContext
->
templateEngine
=
$sourceContext
->
templateEngine
;
if
(
$applicationConfiguration
!==
null
)
{
$applicationContext
->
configuration
=
$applicationConfiguration
;
}
return
$applicationContext
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Fri, Nov 13, 07:55 (3 d, 6 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4238902
Default Alt Text
ApplicationContext.php (1 KB)
Attached To
Mode
rOBSIDIAN Obsidian Workspaces
Attached
Detach File
Event Timeline
Log In to Comment