Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Data Fields | Protected Attributes
Dependency Class Reference

Public Member Functions

 __construct ($module, $type=self::TYPE_HARD)
 
 getModule ()
 
 getType ()
 
 isHard ()
 
 isSoft ()
 

Data Fields

const TYPE_HARD = 'hard'
 
const TYPE_SOFT = 'soft'
 

Protected Attributes

 $module
 
 $type
 

Detailed Description

Dependency

Definition at line 11 of file Dependency.php.

Constructor & Destructor Documentation

◆ __construct()

__construct (   $module,
  $type = self::TYPE_HARD 
)

Dependency construct

Parameters
string$module
string$typeOne of self::TYPE_* constants

Definition at line 38 of file Dependency.php.

Member Function Documentation

◆ getModule()

getModule ( )

Get module

Returns
string

Definition at line 50 of file Dependency.php.

◆ getType()

getType ( )

Get type

Returns
string

Definition at line 60 of file Dependency.php.

◆ isHard()

isHard ( )

Check is hard dependency

Returns
bool

Definition at line 70 of file Dependency.php.

71  {
72  return self::TYPE_HARD == $this->getType();
73  }

◆ isSoft()

isSoft ( )

Check is soft dependency

Returns
bool

Definition at line 80 of file Dependency.php.

81  {
82  return self::TYPE_SOFT == $this->getType();
83  }

Field Documentation

◆ $module

$module
protected

#- #-

Definition at line 23 of file Dependency.php.

◆ $type

$type
protected

Definition at line 30 of file Dependency.php.

◆ TYPE_HARD

const TYPE_HARD = 'hard'

#+ Dependencies types

Definition at line 16 of file Dependency.php.

◆ TYPE_SOFT

const TYPE_SOFT = 'soft'

Definition at line 18 of file Dependency.php.


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