public static function DrushMakeProject::getInstance

8.0.x make.project.inc public static DrushMakeProject::getInstance($type, $project)
6.x make.project.inc public static DrushMakeProject::getInstance($type, $project)
7.x make.project.inc public static DrushMakeProject::getInstance($type, $project)
5.x make.project.inc public static DrushMakeProject::getInstance($type, $project)
master make.project.inc public static DrushMakeProject::getInstance($type, $project)

Get an instance for the type and project.

Parameters

string $type: Type of project: core, library, module, profile, or translation.

array $project: Project information.

Return value

mixed An instance for the project or FALSE if invalid type.

3 calls to DrushMakeProject::getInstance()
drush_make_process in commands/make/make.drush.inc
Drush callback: hidden file to process an individual project.
make_libraries in commands/make/make.drush.inc
Process all libraries specified in the make file.
make_projects in commands/make/make.drush.inc
Process all projects specified in the make file.

File

commands/make/make.project.inc, line 82
Drush Make processing classes.

Class

DrushMakeProject
The base project class.

Code

public static function getInstance($type, $project) {
  if (!isset(self::$self[$type][$project['name']])) {
    $class = 'DrushMakeProject_' . $type;
    self::$self[$type][$project['name']] = class_exists($class) ? new $class($project) : FALSE;
  }
  return self::$self[$type][$project['name']];
}