Zend framework 2 info

,

Forms and actions – Albums example

 

Matthew Setter Running the ZF2Skeleton with PHP’s Built-in Webserver

Zend Framework 2 CheetSheet
Zend FRamework 2 module directory structure

A route -olás, útválasztás miatt szükséges az src-n belül ismételni a modul nevét. (?)

module/
    Account/
        config/
        src/
            Account/
                Controller/
                    CaseController.php (AccountControllerCaseController)
                Entity/
                    CaseEntity.php     (AccountEntityCaseEntity)
                Form/
                    CaseForm.php       (AccountFormCaseForm)
                Mapper/
                    CaseMapper.php     (AccountMapperCaseMapper)
                Service/
                    CaseService.php    (AccountServiceCaseService)
        view/
        Module.php

 

Zend Framework 2 for Newbies

Fájl fetöltés. (nem csak a Standard megoldás) A manual megoldást mutat a feltöltés + adat űrlap ellenőrzésre. Ha az adat, pl. email cím nem érvényes, a feltöltött képet nem dobja el. http://framework.zend.com/manual/2.1/en/modules/zend.form.file-upload.html “When using other standard form inputs (i.e. text, checkbox, select, etc.) along with file inputs in a Form, you can encounter a situation where some inputs may become invalid and the user must re-select the file and re-upload. PHP will delete uploaded files from the temporary directory at the end of the request if it has not been moved away or renamed. Re-uploading a valid file each time another form input is invalid is inefficient and annoying to users.”

Params http://stackoverflow.com/questions/12077126/how-to-access-route-post-get-etc-parameters-in-zend-framework-2

$this->params()->fromPost('paramname');   // From POST
$this->params()->fromQuery('paramname');  // From GET
$this->params()->fromRoute('paramname');  // From RouteMatch
$this->params()->fromHeader('paramname'); // From header
$this->params()->fromFiles('paramname');  // From file being uploaded

View Helper – URL

Database and models¶

 

ZendAuthentication
Create Simple Login Authentication
Database Table Authentication¶

Session Container

Using Sessions in Zend Framework 2

ZendPermissionsAcl

Zend Framework 2: Authentication + Acl using EventManager

Zend Framework 2 ACL setup in 5 minutes – tutorial

AuthenticationService and Session Db

Blogbook : PHP | Javascript | Laravel | Corcel | CodeIgniter | VueJs | ReactJs | WordPress