ILIAS  release_8 Revision v8.24
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 24 of file class.ilCtrlPathFactory.php.

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

References $structure.

Member Function Documentation

◆ existing()

ilCtrlPathFactory::existing ( string  $cid_path)

@inheritDoc

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 
)

@inheritDoc

Implements ilCtrlPathFactoryInterface.

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

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...
$context
Definition: webdav.php:29

References $context.

◆ null()

ilCtrlPathFactory::null ( )

@inheritDoc

Implements ilCtrlPathFactoryInterface.

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

57 {
58 return new ilCtrlNullPath();
59 }
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 17 of file class.ilCtrlPathFactory.php.

Referenced by __construct().


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