SlideShare a Scribd company logo
Zend Framework 3 intro
Crearea unui modul
cd C:
• Install skeleton app:
C:> composer create-project zendframework/skeleton-application zend1
Instalati toate pachetele optionale.
Apoi selectati optiunea 1.
Apoi:
C:> cd zend1
C:>xampphtdocs zend1composer serve
http://localhost:8080
C:> xampphtdocs zend1composer development-status
C:> xampphtdocs zend1composer development-enable
In directorul /zend1/module copiati directorul
Application si redenumiti-l in Netbeans: Test
• In composer.json:
……………………………………………
"autoload": {
"psr-4": {
"Application": "module/Application/src/",
“Test": "module/Test/src/"
}
},
config/modules.config.php
return [
………………………………………………………..
'ZendRouter',
'ZendValidator',
'ZendDeveloperTools',
'Application',
‘Test',
];
• Pentru a integra modulul creat in aplicatie:
C:> xampphtdocs zend1composer dump-autoload
/module/Test/src/Module.php
namespace Test;
class Module
{
const VERSION = '3.0.3-dev';
public function getConfig()
{
return include __DIR__ .
'/../config/module.config.php';
}
}
/module/Test/src/Controller/IndexController.php
namespace TestController;
use ZendMvcControllerAbstractActionController;
use ZendViewModelViewModel;
class IndexController extends AbstractActionController
{
public function indexAction()
{
return new ViewModel();
}
}
/module/Test/config/module.config.php
namespace Test;
use ZendRouterHttpLiteral;
use ZendRouterHttpSegment;
use ZendServiceManagerFactoryInvokableFactory;
return [
'router' => [
'routes' => [
…………………………………………………..
…………………………………………………..
‘test' => [
'type' => Segment::class,
'options' => [
'route' => '/test[/:action]',
'defaults' => [
'controller' => ControllerIndexController::class,
'action' => 'index',
],
],
……………………………………………….
……………………………………………
'view_manager' => [
'display_not_found_reason' => true,
'display_exceptions' => true,
'doctype' => 'HTML5',
'not_found_template' => 'error/404',
'exception_template' => 'error/index',
'template_map' => [
'layout/layout' => __DIR__ . '/../view/layout/layout.phtml',
‘test/index/index' => __DIR__ . '/../view/test/index/index.phtml',
'error/404' => __DIR__ . '/../view/error/404.phtml',
'error/index' => __DIR__ . '/../view/error/index.phtml',
],
……………………………………………………………….
Modificati numele directorului:
/module/test/view/application in
/module/test/view/test
In vederea
/modules/test/view/test/index/index.phtml
scriem:
<h1 style="text-align: center;"><font color="red">URA!!!</font></h1>
http://localhost:8080/

More Related Content

PDF
[MDBCI] Mariadb continuous integration tool
PPT
Ng2 cli v1
PDF
OSDC 2014: Jan-Piet Mens - Configuration Management with Ansible
PDF
OSDC 2013 | Ansible: configuration management doesn't have to be complicated ...
PPTX
Drupal 8 configuration development flow
PDF
Cli jbug
PDF
Docker SQL Continuous Integration Flow
PDF
Working with the AOSP - Linaro Connect Asia 2013
[MDBCI] Mariadb continuous integration tool
Ng2 cli v1
OSDC 2014: Jan-Piet Mens - Configuration Management with Ansible
OSDC 2013 | Ansible: configuration management doesn't have to be complicated ...
Drupal 8 configuration development flow
Cli jbug
Docker SQL Continuous Integration Flow
Working with the AOSP - Linaro Connect Asia 2013

Similar to 1. zend framework intro (20)

PPTX
Android build on windows
PPTX
Rhodes mobile Framework
PPT
Native Android for Windows Developers
PPTX
Android tools for testers
PDF
What makes me "Grunt"?
KEY
Composer
PDF
Installation instructions for R
PPTX
Android chapter02-setup1-sdk
PDF
Android for Embedded Linux Developers
PDF
Puppet at Opera Sofware - PuppetCamp Oslo 2013
PDF
Visual Studio and Xamarin Integration Process
PDF
PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...
PDF
Challenges of container configuration
PPTX
Introduction of phonegap installation and configuration of Phonegap with An...
PDF
Trick or Tip - Symfony Edition
ODP
Android crash debugging
PDF
Native Hadoop with prebuilt spark
PPTX
A complete guide to Node.js
PDF
PDF
Drone CI/CD 自動化測試及部署
Android build on windows
Rhodes mobile Framework
Native Android for Windows Developers
Android tools for testers
What makes me "Grunt"?
Composer
Installation instructions for R
Android chapter02-setup1-sdk
Android for Embedded Linux Developers
Puppet at Opera Sofware - PuppetCamp Oslo 2013
Visual Studio and Xamarin Integration Process
PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...
Challenges of container configuration
Introduction of phonegap installation and configuration of Phonegap with An...
Trick or Tip - Symfony Edition
Android crash debugging
Native Hadoop with prebuilt spark
A complete guide to Node.js
Drone CI/CD 自動化測試及部署
Ad

More from Razvan Raducanu, PhD (20)

PPTX
12. edit record
PPTX
11. delete record
PPTX
10. view one record
PPTX
9. add new record
PPTX
8. vederea inregistrarilor
PPTX
PPTX
6. hello popescu 2
PPTX
5. hello popescu
PPTX
4. forme in zend framework 3
PPTX
3. trimiterea datelor la vederi
PPTX
2.routing in zend framework 3
PPTX
18. images in symfony 4
PPTX
17. delete data
PPTX
16. edit data
PPTX
15. view single data
PPTX
14. add data in symfony4
PPTX
13. view data
PPTX
12.doctrine view data
PPTX
11. move in Symfony 4
PPTX
10. add in Symfony 4
12. edit record
11. delete record
10. view one record
9. add new record
8. vederea inregistrarilor
6. hello popescu 2
5. hello popescu
4. forme in zend framework 3
3. trimiterea datelor la vederi
2.routing in zend framework 3
18. images in symfony 4
17. delete data
16. edit data
15. view single data
14. add data in symfony4
13. view data
12.doctrine view data
11. move in Symfony 4
10. add in Symfony 4
Ad

Recently uploaded (20)

PDF
RMMM.pdf make it easy to upload and study
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PPTX
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
PPTX
Pharma ospi slides which help in ospi learning
PPTX
Cell Types and Its function , kingdom of life
PDF
Basic Mud Logging Guide for educational purpose
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
Complications of Minimal Access Surgery at WLH
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
TR - Agricultural Crops Production NC III.pdf
PDF
Computing-Curriculum for Schools in Ghana
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PPTX
Institutional Correction lecture only . . .
RMMM.pdf make it easy to upload and study
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
Pharma ospi slides which help in ospi learning
Cell Types and Its function , kingdom of life
Basic Mud Logging Guide for educational purpose
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Complications of Minimal Access Surgery at WLH
Abdominal Access Techniques with Prof. Dr. R K Mishra
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
VCE English Exam - Section C Student Revision Booklet
TR - Agricultural Crops Production NC III.pdf
Computing-Curriculum for Schools in Ghana
PPH.pptx obstetrics and gynecology in nursing
Module 4: Burden of Disease Tutorial Slides S2 2025
O7-L3 Supply Chain Operations - ICLT Program
Supply Chain Operations Speaking Notes -ICLT Program
102 student loan defaulters named and shamed – Is someone you know on the list?
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Institutional Correction lecture only . . .

1. zend framework intro