How does Phalcon use AOP?

Source: Internet
Author: User
Tags autoloader
The problem encountered: Phalcon could not check AOP for half a day and found that there are two methods for Implementing AOP in PHP: 1. Expand 2 with CAOP of PHP, existing AOP implementation, but now two of Phalcon do not work. 1. Phalcon conflicts with AOP expansion, and resolutely gives up 2. The existing AOP implementation principles are Hackaut... problem: Phalcon cannot use AOP.

After checking for half a day, we found that there are two methods to implement AOP in PHP: 1. Use c aop in PHP to expand 2. The existing AOP implementation

But now two of Phalcon do not work,
1. Conflicts between Phalcon and AOP expansion, and decisive abandonment
2. The existing AOP implementation principle is that Hack autoloader generates a new class to implement AOP, but Phalcon writes autoloader to his own C. How can he Hack?

Help!

// Update May 20, 2015 12:45:36
There is no way to write only one AOP used in the business layer: https://github.com/zjsxwc/PhalconAOPForBusinessService

Reply content:

Problem: Phalcon cannot use AOP.

After checking for half a day, we found that there are two methods to implement AOP in PHP: 1. Use c aop in PHP to expand 2. The existing AOP implementation

But now two of Phalcon do not work,
1. Conflicts between Phalcon and AOP expansion, and decisive abandonment
2. The existing AOP implementation principle is that Hack autoloader generates a new class to implement AOP, but Phalcon writes autoloader to his own C. How can he Hack?

Help!

// Update May 20, 2015 12:45:36
There is no way to write only one AOP used in the business layer: https://github.com/zjsxwc/PhalconAOPForBusinessService

AOPWhat is the so-called aspect orientation?

PythonProbably not used to this setting mode.PythonThere are roughly two methods to achieve this:

  • Decorator)
  • MetaClass)

You can use the Event mechanism, and you need to bury various points 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.