Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F12587230
ApplicationContext.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
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
*/
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
Thu, Nov 13, 15:32 (1 d, 8 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3158996
Default Alt Text
ApplicationContext.php (1 KB)
Attached To
Mode
rOBSIDIAN Obsidian Workspaces
Attached
Detach File
Event Timeline
Log In to Comment