Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

General callbacks registration #2

Closed
bergie opened this issue Jun 1, 2010 · 2 comments
Closed

General callbacks registration #2

bergie opened this issue Jun 1, 2010 · 2 comments
Assignees
Milestone

Comments

@bergie
Copy link
Member

bergie commented Jun 1, 2010

Currently callbacks to Midgard signals in MidCOM are done by various libraries directly. However, it would be better to handle callback registration as a service that could be configured using normal MidCOM configuration stack.

http://www.midgard-project.org/documentation/php_events/

Something like:

events:
  - 
    class: *
    event: action-update-hook
    callbacks:
      - 
        class: universal_handler
        method: something_was_updated
        additional_parameters: []
  - 
    class: midgard_article
    event: *
    callbacks:
      -
        class: universal_handler
        method: something_happened
        additional_parameters: ['midgard_article']

(copied from http://trac.midgard-project.org/ticket/1278)

@ghost ghost assigned bergie Apr 11, 2011
@bergie
Copy link
Member Author

bergie commented Apr 11, 2011

We should also look at how observation is done in PHPCR: http://www.day.com/maven/jsr170/javadocs/jcr-1.0/javax/jcr/observation/ObservationManager.html

bergie added a commit that referenced this issue Apr 11, 2011
bergie added a commit that referenced this issue Apr 11, 2011
bergie added a commit that referenced this issue Apr 11, 2011
bergie added a commit that referenced this issue Apr 11, 2011
@bergie bergie closed this as completed in 062c211 Apr 11, 2011
@bergie
Copy link
Member Author

bergie commented Apr 11, 2011

Here is an example of registering observers: midgardproject/org_midgardproject_projectsite@f4022f0#diff-1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant