DeepCopy helps you create deep copies (clones) of your objects. It is designed to handle cycles in the association graph. How do you create deep copies of your objects (i.e. copying also all the objects referenced in the properties)? You use __clone() and implement the behavior yourself. DeepCopy recursively traverses all the object's properties and clones them. To avoid cloning the same object twice it keeps a hash map of all instances and thus preserves the object graph. Alternatively, you can create your own DeepCopy instance to configure it differently. You may want to roll your own deep copy function. You can add filters to customize the copy process. DeepCopy\Matcher applies on a object attribute. DeepCopy\TypeMatcher applies on any element found in graph, including array elements. The PropertyNameMatcher will match a property by its name.

Features

  • Implement your own cloning method
  • Use a filter with a type matcher
  • Roll your own deep copy function
  • Add filters to customize the copy process
  • Provides some generic filters and matchers

Project Samples

Project Activity

See All Activity >

Categories

Object Oriented

License

MIT License

Follow DeepCopy

DeepCopy Web Site

Other Useful Business Software
AI-generated apps that pass security review Icon
AI-generated apps that pass security review

Stop waiting on engineering. Build production-ready internal tools with AI—on your company data, in your cloud.

Retool lets you generate dashboards, admin panels, and workflows directly on your data. Type something like “Build me a revenue dashboard on my Stripe data” and get a working app with security, permissions, and compliance built in from day one. Whether on our cloud or self-hosted, create the internal software your team needs without compromising enterprise standards or control.
Try Retool free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of DeepCopy!

Additional Project Details

Programming Language

PHP

Related Categories

PHP Object Oriented Software

Registered

2021-07-19