5. hello popescu

Razvan Raducanu, PhD
Razvan Raducanu, PhDProfessor à "Al. I. Cuza" University
Hello Popescu
FormController
<?php
namespace FormeController;
use ZendMvcControllerAbstractActionController;
use ZendViewModelViewModel;
class FormController extends AbstractActionController
{
public function indexAction()
{
return new ViewModel();
}
public function helloAction()
{
$form=new FormeFormMyForm();
if(!isset($_POST["nume"])){
$msg="Hello! Please enter your name: <br/>";
}else{
$msg="Welcome <b>".$_POST["nume"]."</b>!<br/>";
}
$viewModel = new ViewModel(array('msg' => $msg,'form'=>$form));
$viewModel->setTemplate('forme/index/hello');
return $viewModel;
}
}
view/forme/index/hello.phtml
<?php
$form=$this->form;
$form->prepare();
echo $this->form()->openTag($form);
echo $msg;
echo $this->formRow($form->get('nume'));
echo " ";
echo $this->formSubmit($form->get('submit'));
echo '<br/>';
echo $this->form()->closeTag();
module/Forme/config/module.config.php
……………
'hello' => [
'type' => Literal::class,
'options' => [
'route' => '/hello',
'defaults' => [
'controller' => ControllerFormController::class,
'action' => 'hello',
],
],
],
……………………………………..
……………….
'controllers' => [
'factories' => [
ControllerIndexController::class => InvokableFactory::class,
ControllerFormController::class=>InvokableFactory::class,
],
………………………….
………………………..
'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',
'forme/index/index' => __DIR__ .
'/../view/forme/index/index.phtml',
'forme/index/hello' => __DIR__ . '/../view/forme/index/hello.phtml',
'error/404' => __DIR__ . '/../view/error/404.phtml',
'error/index' => __DIR__ . '/../view/error/index.phtml',
],
………………………
1 sur 7

Recommandé

6. hello popescu 2 par
6. hello popescu 26. hello popescu 2
6. hello popescu 2Razvan Raducanu, PhD
128 vues10 diapositives
7. copy1 par
7. copy17. copy1
7. copy1Razvan Raducanu, PhD
84 vues12 diapositives
C A S Sample Php par
C A S Sample PhpC A S Sample Php
C A S Sample PhpJH Lee
914 vues4 diapositives
14. CodeIgniter adaugarea inregistrarilor par
14. CodeIgniter adaugarea inregistrarilor14. CodeIgniter adaugarea inregistrarilor
14. CodeIgniter adaugarea inregistrarilorRazvan Raducanu, PhD
12 vues9 diapositives
Java script events par
Java script  eventsJava script  events
Java script eventsAbhishekMondal42
10 vues14 diapositives
Laravel the right way par
Laravel   the right wayLaravel   the right way
Laravel the right wayMatheus Marabesi
812 vues31 diapositives

Contenu connexe

Tendances

次世代版 PowerCMS 開発プロジェクトのご紹介 par
次世代版 PowerCMS 開発プロジェクトのご紹介次世代版 PowerCMS 開発プロジェクトのご紹介
次世代版 PowerCMS 開発プロジェクトのご紹介純生 野田
1.8K vues126 diapositives
Introducing jQuery par
Introducing jQueryIntroducing jQuery
Introducing jQueryWildan Maulana
1.1K vues17 diapositives
Component lifecycle hooks in Angular 2.0 par
Component lifecycle hooks in Angular 2.0Component lifecycle hooks in Angular 2.0
Component lifecycle hooks in Angular 2.0Eyal Vardi
3.4K vues27 diapositives
Template syntax in Angular 2.0 par
Template syntax in Angular 2.0Template syntax in Angular 2.0
Template syntax in Angular 2.0Eyal Vardi
3.6K vues26 diapositives
TDC2015 Porto Alegre - Automate everything with Phing ! par
TDC2015 Porto Alegre - Automate everything with Phing !TDC2015 Porto Alegre - Automate everything with Phing !
TDC2015 Porto Alegre - Automate everything with Phing !Matheus Marabesi
1K vues33 diapositives
TICT #13 par
TICT #13TICT #13
TICT #13azman_awan9
570 vues2 diapositives

Tendances(18)

次世代版 PowerCMS 開発プロジェクトのご紹介 par 純生 野田
次世代版 PowerCMS 開発プロジェクトのご紹介次世代版 PowerCMS 開発プロジェクトのご紹介
次世代版 PowerCMS 開発プロジェクトのご紹介
純生 野田1.8K vues
Component lifecycle hooks in Angular 2.0 par Eyal Vardi
Component lifecycle hooks in Angular 2.0Component lifecycle hooks in Angular 2.0
Component lifecycle hooks in Angular 2.0
Eyal Vardi3.4K vues
Template syntax in Angular 2.0 par Eyal Vardi
Template syntax in Angular 2.0Template syntax in Angular 2.0
Template syntax in Angular 2.0
Eyal Vardi3.6K vues
TDC2015 Porto Alegre - Automate everything with Phing ! par Matheus Marabesi
TDC2015 Porto Alegre - Automate everything with Phing !TDC2015 Porto Alegre - Automate everything with Phing !
TDC2015 Porto Alegre - Automate everything with Phing !
Mikhail Kraynuk. Form api. Drupal 8 par i20 Group
Mikhail Kraynuk. Form api. Drupal 8Mikhail Kraynuk. Form api. Drupal 8
Mikhail Kraynuk. Form api. Drupal 8
i20 Group391 vues
Darkmira Tour PHP 2016 - Automatizando Tarefas com Phing par Matheus Marabesi
Darkmira Tour PHP 2016 - Automatizando Tarefas com PhingDarkmira Tour PHP 2016 - Automatizando Tarefas com Phing
Darkmira Tour PHP 2016 - Automatizando Tarefas com Phing
Matheus Marabesi993 vues
Nette framework (WebElement #27 lightning talk) par Adam Štipák
Nette framework (WebElement #27 lightning talk)Nette framework (WebElement #27 lightning talk)
Nette framework (WebElement #27 lightning talk)
Adam Štipák526 vues

Similaire à 5. hello popescu

Frameworks da nova Era PHP FuelPHP par
Frameworks da nova Era PHP FuelPHPFrameworks da nova Era PHP FuelPHP
Frameworks da nova Era PHP FuelPHPDan Jesus
4.1K vues55 diapositives
Tidy Up Your Code par
Tidy Up Your CodeTidy Up Your Code
Tidy Up Your CodeAbbas Ali
3 vues52 diapositives
Symfony2 Building on Alpha / Beta technology par
Symfony2 Building on Alpha / Beta technologySymfony2 Building on Alpha / Beta technology
Symfony2 Building on Alpha / Beta technologyDaniel Knell
750 vues59 diapositives
Modern Web Development with Perl par
Modern Web Development with PerlModern Web Development with Perl
Modern Web Development with PerlDave Cross
32.3K vues77 diapositives
16. CodeIgniter stergerea inregistrarilor par
16. CodeIgniter stergerea inregistrarilor16. CodeIgniter stergerea inregistrarilor
16. CodeIgniter stergerea inregistrarilorRazvan Raducanu, PhD
16 vues4 diapositives
Doctrine For Beginners par
Doctrine For BeginnersDoctrine For Beginners
Doctrine For BeginnersJonathan Wage
1.5K vues69 diapositives

Similaire à 5. hello popescu(20)

Frameworks da nova Era PHP FuelPHP par Dan Jesus
Frameworks da nova Era PHP FuelPHPFrameworks da nova Era PHP FuelPHP
Frameworks da nova Era PHP FuelPHP
Dan Jesus4.1K vues
Symfony2 Building on Alpha / Beta technology par Daniel Knell
Symfony2 Building on Alpha / Beta technologySymfony2 Building on Alpha / Beta technology
Symfony2 Building on Alpha / Beta technology
Daniel Knell750 vues
Modern Web Development with Perl par Dave Cross
Modern Web Development with PerlModern Web Development with Perl
Modern Web Development with Perl
Dave Cross32.3K vues
Migrating to dependency injection par Josh Adell
Migrating to dependency injectionMigrating to dependency injection
Migrating to dependency injection
Josh Adell2.5K vues
PHPCon 2016: PHP7 by Witek Adamus / XSolve par XSolve
PHPCon 2016: PHP7 by Witek Adamus / XSolvePHPCon 2016: PHP7 by Witek Adamus / XSolve
PHPCon 2016: PHP7 by Witek Adamus / XSolve
XSolve1K vues
Decoupling the Ulabox.com monolith. From CRUD to DDD par Aleix Vergés
Decoupling the Ulabox.com monolith. From CRUD to DDDDecoupling the Ulabox.com monolith. From CRUD to DDD
Decoupling the Ulabox.com monolith. From CRUD to DDD
Aleix Vergés1.8K vues
Crafting beautiful software par Jorn Oomen
Crafting beautiful softwareCrafting beautiful software
Crafting beautiful software
Jorn Oomen2K vues
Михаил Крайнюк - Form API + Drupal 8: Form and AJAX par DrupalSib
Михаил Крайнюк - Form API + Drupal 8: Form and AJAXМихаил Крайнюк - Form API + Drupal 8: Form and AJAX
Михаил Крайнюк - Form API + Drupal 8: Form and AJAX
DrupalSib757 vues
Advanced php testing in action par Jace Ju
Advanced php testing in actionAdvanced php testing in action
Advanced php testing in action
Jace Ju2.1K vues

Plus de Razvan Raducanu, PhD

12. edit record par
12. edit record12. edit record
12. edit recordRazvan Raducanu, PhD
616 vues3 diapositives
11. delete record par
11. delete record11. delete record
11. delete recordRazvan Raducanu, PhD
192 vues4 diapositives
10. view one record par
10. view one record10. view one record
10. view one recordRazvan Raducanu, PhD
129 vues5 diapositives
9. add new record par
9. add new record9. add new record
9. add new recordRazvan Raducanu, PhD
188 vues9 diapositives
8. vederea inregistrarilor par
8. vederea inregistrarilor8. vederea inregistrarilor
8. vederea inregistrarilorRazvan Raducanu, PhD
192 vues16 diapositives
4. forme in zend framework 3 par
4. forme in zend framework 34. forme in zend framework 3
4. forme in zend framework 3Razvan Raducanu, PhD
53 vues17 diapositives

Plus de Razvan Raducanu, PhD(20)

Dernier

Meet the Bible par
Meet the BibleMeet the Bible
Meet the BibleSteve Thomason
78 vues80 diapositives
Jibachha publishing Textbook.docx par
Jibachha publishing Textbook.docxJibachha publishing Textbook.docx
Jibachha publishing Textbook.docxDrJibachhaSahVetphys
54 vues14 diapositives
Create a Structure in VBNet.pptx par
Create a Structure in VBNet.pptxCreate a Structure in VBNet.pptx
Create a Structure in VBNet.pptxBreach_P
86 vues8 diapositives
UNIDAD 3 6º C.MEDIO.pptx par
UNIDAD 3 6º C.MEDIO.pptxUNIDAD 3 6º C.MEDIO.pptx
UNIDAD 3 6º C.MEDIO.pptxMarcosRodriguezUcedo
146 vues32 diapositives
A Guide to Applying for the Wells Mountain Initiative Scholarship 2023 par
A Guide to Applying for the Wells Mountain Initiative Scholarship 2023A Guide to Applying for the Wells Mountain Initiative Scholarship 2023
A Guide to Applying for the Wells Mountain Initiative Scholarship 2023Excellence Foundation for South Sudan
82 vues26 diapositives
Collective Bargaining and Understanding a Teacher Contract(16793704.1).pptx par
Collective Bargaining and Understanding a Teacher Contract(16793704.1).pptxCollective Bargaining and Understanding a Teacher Contract(16793704.1).pptx
Collective Bargaining and Understanding a Teacher Contract(16793704.1).pptxCenter for Integrated Training & Education
106 vues57 diapositives

Dernier(20)

Create a Structure in VBNet.pptx par Breach_P
Create a Structure in VBNet.pptxCreate a Structure in VBNet.pptx
Create a Structure in VBNet.pptx
Breach_P86 vues
Parts of Speech (1).pptx par mhkpreet001
Parts of Speech (1).pptxParts of Speech (1).pptx
Parts of Speech (1).pptx
mhkpreet00146 vues
EILO EXCURSION PROGRAMME 2023 par info33492
EILO EXCURSION PROGRAMME 2023EILO EXCURSION PROGRAMME 2023
EILO EXCURSION PROGRAMME 2023
info33492202 vues
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (FRIE... par Nguyen Thanh Tu Collection
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (FRIE...BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (FRIE...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (FRIE...
NodeJS and ExpressJS.pdf par ArthyR3
NodeJS and ExpressJS.pdfNodeJS and ExpressJS.pdf
NodeJS and ExpressJS.pdf
ArthyR348 vues
Retail Store Scavenger Hunt.pptx par jmurphy154
Retail Store Scavenger Hunt.pptxRetail Store Scavenger Hunt.pptx
Retail Store Scavenger Hunt.pptx
jmurphy15452 vues
Payment Integration using Braintree Connector | MuleSoft Mysore Meetup #37 par MysoreMuleSoftMeetup
Payment Integration using Braintree Connector | MuleSoft Mysore Meetup #37Payment Integration using Braintree Connector | MuleSoft Mysore Meetup #37
Payment Integration using Braintree Connector | MuleSoft Mysore Meetup #37
The Accursed House by Émile Gaboriau par DivyaSheta
The Accursed House  by Émile GaboriauThe Accursed House  by Émile Gaboriau
The Accursed House by Émile Gaboriau
DivyaSheta251 vues
The Future of Micro-credentials: Is Small Really Beautiful? par Mark Brown
The Future of Micro-credentials:  Is Small Really Beautiful?The Future of Micro-credentials:  Is Small Really Beautiful?
The Future of Micro-credentials: Is Small Really Beautiful?
Mark Brown75 vues

5. hello popescu