Skip to content

Instantly share code, notes, and snippets.

@tentacode
Last active December 14, 2015 07:29
Show Gist options
  • Select an option

  • Save tentacode/5050925 to your computer and use it in GitHub Desktop.

Select an option

Save tentacode/5050925 to your computer and use it in GitHub Desktop.

Here is what I'm trying to achieve.

I've got a ProjectBundle (Symfony2 bundle), with a Project Propel class. It represent an instance of a website, for example : two music band website share the code base, two different url, same logic but different data.

Various other Bundles (lets say "a dozen") can plug to the Project bundle, for example a BlogBundle will contain a Post and Comment Propel classes. A post is linked to a project via a foreign key (one project, several posts).

The issue is : the ProjectBundle is to remain independant, I don't want the Project class to have a Project::getPosts method because the BlogBundle might not be included in vendors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment