Replaces an existing leaf with a new one.
AssetInterface $needle The current asset to replace:
AssetInterface $replacement The new asset:
Boolean $graceful Whether the failure should return false or throw an exception:
Boolean Whether the asset has been found
\InvalidArgumentException If the asset cannot be found
public function replaceLeaf(AssetInterface $needle, AssetInterface $replacement, $graceful = false);