Phalcon how AOP

Source: Internet
Author: User
Tags autoloader
Problems encountered: Phalcon cannot be AOP

For a long while, found that the general PHP implementation of AOP There are 2 ways: 1, with PHP C AOP expansion 2, the existing AOP implementation

But now 2 of the Phalcon are not working,
1,phalcon and AOP expand conflict and give up decisively
2, the existing AOP implementation principle is hack autoloader to generate new classes to implement AOP, but Phalcon to write autoloader to his own C, but also how hack ah

Help!

Update May 20, 2015 12:45:36
There's no way to write an AOP yourself. Use the business layer: Https://github.com/zjsxwc/PhalconAOPForBusinessService

Reply content:

Problems encountered: Phalcon cannot be AOP

For a long while, found that the general PHP implementation of AOP There are 2 ways: 1, with PHP C AOP expansion 2, the existing AOP implementation

But now 2 of the Phalcon are not working,
1,phalcon and AOP expand conflict and give up decisively
2, the existing AOP implementation principle is hack autoloader to generate new classes to implement AOP, but Phalcon to write autoloader to his own C, but also how hack ah

Help!

Update May 20, 2015 12:45:36
There's no way to write an AOP yourself. Use the business layer: Https://github.com/zjsxwc/PhalconAOPForBusinessService

AOPThe so-called face plane?

PythonGenre is probably not used to this setup pattern. PythonThere are roughly two ways to achieve similar approaches:

    • Adorner (Decorator)
    • Meta-Class (Metaclass)

You can use the event mechanism, and you need to bury the dots in the program.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.