Added the constructor support for php class when receiving fact.
Added the destroy code.