How easy is it to extend / change the Zend Framework?

I recently started building version 2 of my old custom MVC framework. He did a great job for me on a number of projects, but I definitely see opportunities for improvement. It lacks some basic features, such as ACLs, form validation, and caching. As much as I would like to build these parts myself, I know that this is not a reasonable solution. So, I started to learn Zend Framework 1.9. I really like how his component library is loosely coupled. However, looking at various textbooks, this seems very verbose. I saw some sample applications that I could duplicate using less code with my own infrastructure. Thus, I would like to “override” most of this to make it more RAD friendly. Therefore, before investing a lot of time in the framework, I hopedthat someone can highlight this issue for me. I am an encoder at heart, and I have no problem spending hours on hourly settings and setting something up if it has a solid foundation (which I hope ZF has).

I should note that I am very pleased to see that Doctrine can be integrated with ZF.

If ZF is not easily extensible, then what other structures (which also have ACLs, form validation, caching)? I looked at Symfony, but the whole configuration throughout the Concert really bothered me.

Thanks in advance for any input.

Edit
To answer the tharkun question, I mean that “easily extensible” is that I can collapse my own classes (which may or may not extend ZF classes) and pack them into a structure so that I can easily create a code base for their own projects.

+3
source share
6 answers

PHP ZF, , , - .

.

, , , ZF , , , , OO, .

. ZF , ZF. ZF , . :

//this will be the only require needed for your whole application
require_once 'Zend/Loader/Autoloader.php';
$loader = Zend_Loader_Autoloader::getInstance();
$loader->registerNamespace('Mylibrary_');

Mylibrary ZF. , Zend_Db_Table_Abstract. Zend/Db/Table/Abstract.php. : Mylibrary/Db/Table/Abstract.php. :

class Myproject_Db_Table_Abstract extends Zend_Db_Table_Abstract
{
    /*
    now you're ready to extend and override as much as you like.
    and as a bonus you'll not even hav to include your library files 
    since your library is registered with the loader
    */
}

- , ?

+8

, ZF. , . , , , . ZF . . , .

, ZF - php, - .

+2

Zend FW - . . . , , . .

; Zend FW , - - . ; Zend_This_IsAn_Example /library/Zend/This/IsAn/Example.php, Whatever_This_IsAn_Example, /library/Whatever/This/IsAn/Example.php , , _.

mvc;

/ // // .. // // / /Library/Zend /Library/ /

http://framework.zend.com/manual/en/introduction.html http://framework.zend.com/docs/quickstart

+1

. ZF , . , ZF . , , , .

+1

Zend Framework .

"myExtenions", Zend Framework. :

Zym Zend Framework

0

The main thing is that you can easily code the interface. Are you unhappy with the implementation of Zend_Acl_Resource? Create your own resource class that implements Zend_Acl_Resource_Interface :)

0
source

Source: https://habr.com/ru/post/1718975/


All Articles