// Determine the component-specific options
$options =
array_merge(self::
getOptions(strtolower($component)),
$options);
if (!
$options['getShared'
]) { if (isset(self::
$aliases[$component][$alias])) { $class = self::
$aliases[$component][$alias];
return new $class(...
$arguments);
} // Try to locate the class
if ($class = self::
locateClass($options,
$alias)) { return new $class(...
$arguments);
} return null;
} // Check for an existing definition
$instance = self::
getDefinedInstance($options,
$alias,
$arguments);
if ($instance !== null
) { return $instance;
}