Use this method in order to access PublishingWeb behavior for an instance of a SPWeb class that has already been retrieved. You can also retrieve instances of the PublishingWeb class through the GetPublishingWebs method.
Before you use this method, check the IsPublishingWeb method to confirm that publishing behavior is supported on this instance of the SPWeb class. If publishing is not supported on the SPWeb, then the methods and properties of the PublishingWeb wrapper may behave unexpectedly.
It is up to the caller of this method to close the instance of the SPWeb class that was passed in by calling the SPWeb.Close method. Calling the PublishingWeb.Close method has no effect.