Upcasts (promotes) the instance to another class name
by creating a new instance of the provided class and
passing $this->manifest as seed. If NULL is passed as
desired class name the expected final class name is
determined based on naming convention.
public function upcast($desiredClassName = NULL)
{
if (!$desiredClassName) {
$desiredClassName = $this->getNamespacePrefix() . 'FluxPackage';
}
return new $desiredClassName($this->manifest);
}