O'Reilly logo

Web Application Development with Yii 2 and PHP by Jeffrey Winesett, Mark Safronov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating the extension contents

Our plan is as follows:

We will develop our extension in a folder, which is different from our example CRM application.

This extension will be named yii2-malicious, to be consistent with the naming of other Yii 2 extensions.

Given the kind of payload we saw earlier, our extension will consist of a single controller and some special wiring code (which we haven't learned about yet) to automatically attach this controller to the application.

Finally, to consider this subproject a true Yii 2 extension and not just some random library, we want it to be installable in the same way as other Yii 2 extensions.

Preparing the boilerplate code for the extension

Let's make a separate directory, initialize the Git repository there, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required