We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5253
    • 17 Posts
    hi everyone,

    sorry for this noob questions, but I’m really confused about Revo and xPDO - just started devoloping with revo wink

    What I have:
    - 4 custom tables in use with a snippet
    - xPDO model in core/compentents/mysnippet/model
    - snippet code in core/components/mysnippet/elements/snippets/snippet.php
    - a general snippet class in core/components/mysnippet/snippet.class.php
    - 4 custom table specific classes (e.g. projects.class.php), map files and so on

    What I actually wanted:
    - the general snippet class should handle general things (get, set for all objects (specified by parameters) etc.)
    - the table related classes should contain table specific methods which uses the general snippet methods (e.g. loadpropjects in projects.class.php calls with parameters the loadobject in mysnippet.class.php)

    I’m really confused: What are the specific table classes for? Can I use them for what I want? When these classes are initiated: with calling getService(mysnippet.class.php) or with addPackage?

    There are a lot more questions, but perhaps some of them are solved by understanding the "big thing" behind wink

    thanks in advance!
    Chris
      *there are no strangers - just friends who never met*
      • 9207 ☆ A M B ☆
      • 2,475 Posts
      Oh man, we really need docs for stuff like this. It’s swimming in the dark for a lot of people.

      I put together this doc after struggling with that sort of thing for a long time:
      http://rtfm.modx.com/display/revolution20/Reverse+Engineer+xPDO+Classes+from+Existing+Database+Table

      Hope that helps.