Elgg  Version 5.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 (\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

 $plugin
 
 $configuration
 

Detailed Description

Holds plugin composer.json related functions.

Definition at line 17 of file Composer.php.

Constructor & Destructor Documentation

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

Constructor.

Parameters
\ElggPlugin$pluginPlugin
Exceptions
ComposerException

Definition at line 36 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 170 of file Composer.php.

Elgg\Plugin\Composer::assertConflicts ( )

Asserts if there are conflicts.

Returns
void
Exceptions
ConflictException

Definition at line 137 of file Composer.php.

Elgg\Plugin\Composer::assertPluginId ( )

Asserts if plugin id matches project name.

Returns
void
Exceptions
IdMismatchException

Definition at line 66 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 230 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 212 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 195 of file Composer.php.

Elgg\Plugin\Composer::getCategories ( )

Returns an array with categories.

Returns
array

Definition at line 91 of file Composer.php.

Elgg\Plugin\Composer::getConfiguration ( )

Returns the composer configuration.

Returns

Definition at line 56 of file Composer.php.

Elgg\Plugin\Composer::getConflicts ( )

Returns an array of projectnames with their conflicting version.

Returns
array

Definition at line 117 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 259 of file Composer.php.

Elgg\Plugin\Composer::getLicense ( )

Returns the license.

Returns
string

Definition at line 77 of file Composer.php.

Member Data Documentation

Elgg\Plugin\Composer::$configuration
protected

Definition at line 27 of file Composer.php.

Elgg\Plugin\Composer::$plugin
protected

Definition at line 22 of file Composer.php.


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