ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
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)
 
 existing (string $cid_path)
 
 null ()
 

Private Attributes

ilCtrlStructureInterface $structure
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilCtrlPathFactory::__construct ( ilCtrlStructureInterface  $structure)

ilCtrlPathFactory Constructor

Parameters
ilCtrlStructureInterface$structure

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

References $structure.

25  {
26  $this->structure = $structure;
27  }
ilCtrlStructureInterface $structure

Member Function Documentation

◆ existing()

ilCtrlPathFactory::existing ( string  $cid_path)

Implements ilCtrlPathFactoryInterface.

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

49  {
50  return new ilCtrlExistingPath($this->structure, $cid_path);
51  }
Class ilCtrlExistingPath.
Interface ilCtrlPathInterface is responsible for holding and manipulating a valid ilCtrl class-path (...

◆ find()

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

Implements ilCtrlPathFactoryInterface.

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

References null().

33  {
34  if (is_array($target)) {
35  return new ilCtrlArrayClassPath($this->structure, $context, $target);
36  }
37 
38  if (is_string($target)) {
39  return new ilCtrlSingleClassPath($this->structure, $context, $target);
40  }
41 
42  return $this->null();
43  }
Class ilCtrlArrayClassPath.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Interface ilCtrlPathInterface is responsible for holding and manipulating a valid ilCtrl class-path (...
+ Here is the call graph for this function:

◆ null()

ilCtrlPathFactory::null ( )

Implements ilCtrlPathFactoryInterface.

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

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

57  {
58  return new ilCtrlNullPath();
59  }
Class ilCtrlNullPath.
Interface ilCtrlPathInterface is responsible for holding and manipulating a valid ilCtrl class-path (...
+ Here is the caller graph for this function:

Field Documentation

◆ $structure

ilCtrlStructureInterface ilCtrlPathFactory::$structure
private

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

Referenced by __construct().


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