Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7862905
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T23:18:40+00:00 2026-06-02T23:18:40+00:00

Are there any .Net automapper equivalent libraries but for php? i.e. something that will

  • 0

Are there any .Net automapper equivalent libraries but for php?

i.e. something that will copy all info from one class to another, for example user <-> userDTO.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T23:18:41+00:00Added an answer on June 2, 2026 at 11:18 pm

    Update: Yes there are! I wrote a little rudimentary library, which can be downloaded here: http://automapper.nylle.de


    Original answer:
    I haven’t heard of it, but I assume this to be rather unlikely, since PHP does not support return types for methods or functions. How can you possibly map the properties of two different classes, if you can only reflect their names, but not their types?

    You could still write a little static helper class that simply gets two flat objects and copies all values from one property to the other class’ property with the same name using reflection, but this will only work, if you know what you do and the types are convertable (like scalar types string/int/bool).

    Maybe you can put some more reliability into it by parsing the phpdoc part (if available) to get a clue about the return type.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Are there any .NET libraries out there that will parse a string as a
Is there any .NET logging framework that have ability to switch appender if something
Are there any .Net libraries that provide a way of exporting sql database data
Is there any Library for .NET that returns SPARQL results in some structured List
is there any custom asp.net membership providers that someone has already created online. I
Is there any way to access my asp.net dev server (launched from visual studio)
Are there any .NET classes/functions that are optimized for multiple cores? I know that
Is there any .Net library to remove all problematic characters of a string and
Are there any .NET libraries etc. which allow adding layers (with text) to .tiff
Is there any .NET type that would represent a set of key-value pairs where

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.