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@ @ @ @ @ @ @ @ @ @ @ @
@ @ @ @ @ @
@ @ @ @ @ @
@ @ @ @ @ @
@ @ @ @ @ @
@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @
ƂāALlA^CANVr[n̂ƂB
{Rg[.phpit@Cj {r[itH_j
{NX @ @ @ @ @ @ @ @ @ @ @ @ @
@ @ @ @ @ @
@ ANV @
 @
Ƃ傤 @ r[.phtml @
@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @
@ @ @ @ @ @
@ ANV @ @ @ r[.phtml @
@ @ @ @ @ @ @
 @
@ @ @ @ @ @ @ @ @ @
@ @ @ @ @ @
@ ÉANV
 @
@ Ȃ @ Ér[.phtml @
@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @
@ @ @ @ @ @
@ @ @ @ @ @
@ @ @ @ @ @
@ @ @ @ @ @
@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @
C[WLVB
܂́A{Rg[i.phpjB
JapanController.php
C:\xampp\ZendSkeleton\module\Application\src\Application\Controller
<?php @
@
namespace Application\Controller; @
@
use Zend\Mvc\Controller\AbstractActionController; @
use Zend\View\Model\ViewModel; @
@
class JapanController extends AbstractActionController @
{ @
@
} @
āAANVi\bhjB {Rg[.phpit@Cj
{NX @ @ @ @
ANVi\bhj @ @ @
@     public function tokyoAction(){ @ @ ANV @ @
@         return new ViewModel(array('key'=>'Ƃ傤')); @ @ @ @ @ @ @ @ @ @
@     } @ @ @ @
@ ANV @ @
ANVi\bhj @ @ @ @ @ @ @ @ @
@     public function osakaAction(){ @ @ @ @
@         return new ViewModel(array('key'=>'')); @ @ ÉANV @
@     } @ @ @ @ @ @ @ @ @ @
@ @ @
ÉANVi\bhj @ @ @
@     public function nagoyaAction(){ @ @ @ @
@         return new ViewModel(array('key'=>'Ȃ')); @ @ @ @
@     } @ @ @ @ @ @ @ @ @ @
ƁAL̂悤ɂȂB
<?php @
@
namespace Application\Controller; @
@
use Zend\Mvc\Controller\AbstractActionController; @
use Zend\View\Model\ViewModel; @
@
class JapanController extends AbstractActionController @
{ @
public function tokyoAction(){ @
return new ViewModel(array('key'=>'Ƃ傤')); @
} @
@
public function osakaAction(){ @
return new ViewModel(array('key'=>'')); @
} @
@
public function nagoyaAction(){ @
return new ViewModel(array('key'=>'Ȃ')); @
} @
@
} @
Ȃ݂ɁAŁA
ɃANZXƁALG[ƂȂB
̃G[ɂ́A
module.config
{Rg[`Ȃ΂ȂȂB
̓IɂL̂悤`B
,'Application\Controller\Japan' => 'Application\Controller\JapanController' @
C:\xampp\ZendSkeleton\module\Application\config\module.config.php
ēxA
http://localhost/140323a/application/japan/tokyo
ɃANZXƁA܂̃G[B
́ARg[Ήr[ĂȂƂłB
Rg[AΉ̃r[Ȃ΂ȂȂB
ł́Ar[B
{Rg[.phpit@Cj {r[itH_j
{NX @ @ @ @ @ @ @ @ @ @ @ @ @
@ @ @ @ @ @
@ ANV @
 @
Ƃ傤 @ r[.phtml @
@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @
@ @ @ @ @ @
@ ANV @ @ @ r[.phtml @
@ @ @ @ @ @ @
 @
@ @ @ @ @ @ @ @ @ @
@ @ @ @ @ @
@ ÉANV
 @
@ Ȃ @ Ér[.phtml @
@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @
@ @ @ @ @ @
@ @ @ @ @ @
@ @ @ @ @ @
@ @ @ @ @ @
@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @
܂́Ar[i[{tH_ijapanjB
āAjapantH_z tokyo.phtml A
L̂悤ɃR[fBOB
<?php echo \$key; ?> @
ēxA
http://localhost/140323a/application/japan/tokyo
ɃANZXƁALK\B
ŁAuƂ傤vƂ́ARg[ĩANVjr[
nĂAƂ_ĂقB
ł́AāAÉ̃r[ĂB
{Rg[.phpit@Cj {r[itH_j
{NX @ @ @ @ @ @ @ @ @ @ @ @ @
@ @ @ @ @ @
@ ANV @
 @
Ƃ傤 @ r[.phtml @
@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @
@ @ @ @ @ @
@ ANV @ @ @ r[.phtml @
@ @ @ @ @ @ @
 @
@ @ @ @ @ @ @ @ @ @
@ @ @ @ @ @
@ ÉANV
 @
@ Ȃ @ Ér[.phtml @
@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @
@ @ @ @ @ @
@ @ @ @ @ @
@ @ @ @ @ @
@ @ @ @ @ @
@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @
g͂
<?php echo \$key; ?> @
łB
ŁALɃANZXƁAeK\B
http://localhost/140323a/application/japan/osaka http://localhost/140323a/application/japan/nagoya
āARg[ɃANVȊÕ\bh߂CB
TO}LB
{Rg[.phpit@Cj {r[itH_j
{NX @ @ @ @ @ @ @ @ @ @ @ @ @
@ @ @ @ @ @
@ ANV @
 @
Ƃ傤 @ r[.phtml @
@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @
@ @ @ @ @ @
@ ANV @ @ @ r[.phtml @
@ @ @ @ @ @ @
 @
@ @ @ @ @ @ @ @ @ @
@ @ @ @ @ @
@ ÉANV
 @
@ Ȃ @ Ér[.phtml @
@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @
@ @ @ @ @ @
@ C̃\bh @ @ @ @ @
@ @ @ @ @ @ @ @ @ @ @ @
@ @ @ @ @ @
@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @
{Rg[i{NXj̃o\bhƂāA
C̃\bhǉłB̓ANVłKv̂ŁA
ANVoAĆAΉr[svƂȂB
āAC̃\bh́AeANVo_ƂłB
̓Iɂ́AL̂悤łB
܂AC̃\bhB
public function getHoge(){ @
return 'ق'; @
} @
́uقvƂ̃\bhłBANVł͂ȂB
āA{NXݒuB
ł́AANVAgetHogeo_Ă݂B
L̂悤ANViIB
public function tokyoAction(){ @
return new ViewModel(array('key'=>'Ƃ傤'.\$this->getHoge()));
} @
ŁA
http://localhost/140323a/application/japan/tokyo
ɃANZXL̂悤ɂȂB
uƂ傤vɁuقvǉĂB
ȏ