ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilCtrlPathFactory Class Reference

Class ilCtrlPathFactory. More...

+ Inheritance diagram for ilCtrlPathFactory:
+ Collaboration diagram for ilCtrlPathFactory:

Public Member Functions

 __construct (ilCtrlStructureInterface $structure)
 ilCtrlPathFactory Constructor More...
 
 find (ilCtrlContextInterface $context, $target)
 @inheritDoc More...
 
 existing (string $cid_path)
 @inheritDoc More...
 
 null ()
 @inheritDoc More...
 
 find (ilCtrlContextInterface $context, $target)
 Returns the corresponding ilCtrlPath by the provided target type. More...
 
 existing (string $cid_path)
 Returns an instance of an existing ilCtrlPath. More...
 
 null ()
 Returns a pseudo instance of an ilCtrlPath. More...
 

Private Attributes

ilCtrlStructureInterface $structure
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilCtrlPathFactory::__construct ( ilCtrlStructureInterface  $structure)

ilCtrlPathFactory Constructor

Parameters
ilCtrlStructureInterface$structure

Definition at line 38 of file class.ilCtrlPathFactory.php.

39 {
40 $this->structure = $structure;
41 }
ilCtrlStructureInterface $structure

References $structure.

Member Function Documentation

◆ existing()

ilCtrlPathFactory::existing ( string  $cid_path)

@inheritDoc

Implements ilCtrlPathFactoryInterface.

Definition at line 62 of file class.ilCtrlPathFactory.php.

63 {
64 return new ilCtrlExistingPath($this->structure, $cid_path);
65 }
Class ilCtrlExistingPath.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ find()

ilCtrlPathFactory::find ( ilCtrlContextInterface  $context,
  $target 
)

@inheritDoc

Implements ilCtrlPathFactoryInterface.

Definition at line 46 of file class.ilCtrlPathFactory.php.

47 {
48 if (is_array($target)) {
49 return new ilCtrlArrayClassPath($this->structure, $context, $target);
50 }
51
52 if (is_string($target)) {
53 return new ilCtrlSingleClassPath($this->structure, $context, $target);
54 }
55
56 return $this->null();
57 }
Class ilCtrlArrayClassPath.
Class ilCtrlSingleClassPath.
$context
Definition: webdav.php:31

References $context.

◆ null()

ilCtrlPathFactory::null ( )

@inheritDoc

Implements ilCtrlPathFactoryInterface.

Definition at line 70 of file class.ilCtrlPathFactory.php.

71 {
72 return new ilCtrlNullPath();
73 }
Class ilCtrlNullPath.

Referenced by ilCtrlContext\__construct(), and ilCtrlContextTest\getContextWithManualAdoption().

+ Here is the caller graph for this function:

Field Documentation

◆ $structure

ilCtrlStructureInterface ilCtrlPathFactory::$structure
private

Definition at line 31 of file class.ilCtrlPathFactory.php.

Referenced by __construct().


The documentation for this class was generated from the following file: