restructure application classes
This commit is contained in:
commit
a6d9bf653a
3471 changed files with 597952 additions and 0 deletions
48
agents/IntermediateAgent.inc
Normal file
48
agents/IntermediateAgent.inc
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* NRE
|
||||
*
|
||||
* @author coderkun <olli@coderkun.de>
|
||||
* @copyright 2013 coderkun (http://www.coderkun.de)
|
||||
* @license http://www.gnu.org/licenses/gpl.html
|
||||
* @link http://www.coderkun.de/projects/nre
|
||||
*/
|
||||
|
||||
namespace nre\agents;
|
||||
|
||||
|
||||
/**
|
||||
* The IntermediateAgent assumes the task of a module. There is only one
|
||||
* IntermediateAgent per request.
|
||||
*
|
||||
* @author coderkun <olli@coderkun.de>
|
||||
*/
|
||||
abstract class IntermediateAgent extends \nre\core\Agent
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Get the layout if it was explicitly defined.
|
||||
*
|
||||
* @return string Layout of the IntermediateAgent
|
||||
*/
|
||||
public static function getLayout($agentName)
|
||||
{
|
||||
// Determine classname
|
||||
$className = Autoloader::concatClassNames($agentName, 'Agent');
|
||||
|
||||
// Check property
|
||||
if(isset($className::$layout)) {
|
||||
return $className::$layout;
|
||||
}
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue