Elgg  Version 6.1
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Elgg\Plugin\Composer Class Reference

Holds plugin composer.json related functions. More...

Public Member Functions

 __construct (protected\ElggPlugin $plugin)
 Constructor. More...
 
 getConfiguration ()
 Returns the composer configuration. More...
 
 assertPluginId ()
 Asserts if plugin id matches project name. More...
 
 getLicense ()
 Returns the license. More...
 
 getCategories ()
 Returns an array with categories. More...
 
 getConflicts ()
 Returns an array of projectnames with their conflicting version. More...
 
 assertConflicts ()
 Asserts if there are conflicts. More...
 
 assertActivePluginConflicts ()
 Asserts if there are active plugins that conflict with the current plugin. More...
 
 checkConstraints ($version, $constraints)
 Determine if given version satisfies given constraints. More...
 
 assertRequiredPhpVersion ()
 Asserts if the required php version matches the actual php version. More...
 
 assertRequiredPhpExtensions ()
 Asserts if the required php extensions matches the actual installed extensions. More...
 

Protected Member Functions

 getFriendlyCategory ($category)
 Returns a category's friendly name. More...
 

Protected Attributes

 $configuration
 

Detailed Description

Holds plugin composer.json related functions.

Definition at line 17 of file Composer.php.

Constructor & Destructor Documentation

Elgg\Plugin\Composer::__construct ( protected\ElggPlugin  $plugin)

Constructor.

Parameters
\ElggPlugin$pluginPlugin
Exceptions
ComposerException

Definition at line 31 of file Composer.php.

Member Function Documentation

Elgg\Plugin\Composer::assertActivePluginConflicts ( )

Asserts if there are active plugins that conflict with the current plugin.

Returns
void
Exceptions
ConflictException

Definition at line 163 of file Composer.php.

Elgg\Plugin\Composer::assertConflicts ( )

Asserts if there are conflicts.

Returns
void
Exceptions
ConflictException

Definition at line 130 of file Composer.php.

Elgg\Plugin\Composer::assertPluginId ( )

Asserts if plugin id matches project name.

Returns
void
Exceptions
IdMismatchException

Definition at line 59 of file Composer.php.

Elgg\Plugin\Composer::assertRequiredPhpExtensions ( )

Asserts if the required php extensions matches the actual installed extensions.

Returns
void
Exceptions
PhpExtensionException

Definition at line 223 of file Composer.php.

Elgg\Plugin\Composer::assertRequiredPhpVersion ( )

Asserts if the required php version matches the actual php version.

Returns
void
Exceptions
PhpVersionException

Definition at line 205 of file Composer.php.

Elgg\Plugin\Composer::checkConstraints (   $version,
  $constraints 
)

Determine if given version satisfies given constraints.

Parameters
string$versionversion to check
string$constraintssemver notation of version constraint
Returns
boolean

Definition at line 188 of file Composer.php.

Elgg\Plugin\Composer::getCategories ( )

Returns an array with categories.

Returns
array

Definition at line 84 of file Composer.php.

Elgg\Plugin\Composer::getConfiguration ( )

Returns the composer configuration.

Returns

Definition at line 49 of file Composer.php.

Elgg\Plugin\Composer::getConflicts ( )

Returns an array of projectnames with their conflicting version.

Returns
array

Definition at line 110 of file Composer.php.

Elgg\Plugin\Composer::getFriendlyCategory (   $category)
protected

Returns a category's friendly name.

This can be localized by defining the string 'admin:plugins:category:<category>'. If no localization is found, returns the category with _ and - converted to ' ' and then ucwords()'d.

Parameters
string$categoryThe category
Returns
string A human-readable category

Definition at line 252 of file Composer.php.

Elgg\Plugin\Composer::getLicense ( )

Returns the license.

Returns
string

Definition at line 70 of file Composer.php.

Member Data Documentation

Elgg\Plugin\Composer::$configuration
protected

Definition at line 22 of file Composer.php.


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