A happy new year !!
A happy new year 2008 !!
I hope your life will be wonderful this year !!
(weight 88.8kg BMI 30%)
Labels: Diary
[phase]
1. A pig which can make your dreams come true.
2. A company's name which the author will make in the future.
3. A diary of a guy who wants to lose weight.
A happy new year 2008 !!
Labels: Diary
A interesting web service "MyMiniCity" has launched.
Build your own city!
No need to sign up, nothing to download! Follow its evolution from your web browser.
I went to GU drinking yesterday.
Labels: Diary
**************************************** Notice ****************************************
<?php
require_once 'Zend/Controller/Action/Helper/ViewRenderer.php';
/**
* View script integration
*/
class Hoge_Controller_Action_Helper_ViewRenderer extends Zend_Controller_Action_Helper_ViewRenderer
{
/**
* postDispatch - auto render a view
* @return void
*/
public function postDispatch()
{
if ($this->getFrontController()->getParam('noViewRenderer')) {
return;
}
if (!$this->_neverRender
&& !$this->_noRender
&& (null !== $this->_actionController)
&& $this->getRequest()->isDispatched()
&& !$this->getResponse()->isRedirect())
{
if($this->hasViewLayout()) {
$this->render();
$this->view->contens = $this->getResponse()->getBody();
$this->getResponse()->clearBody();
$this->render($this->getViewLayout(), null, true);
} else {
$this->render();
}
}
}
/**
* if layout is sat.
* @return bool
*/
function hasViewLayout()
{
if ($this->getActionController()->layout) {
return true;
}
return false;
}
/**
* Get layout template
* @return string
*/
function getViewLayout()
{
return $this->getActionController()->layout;
}
}
$view = new Zend_View();
$view->setScriptPath(dirname(dirname(__FILE__)) . '/application/views/scripts/');
$view->addScriptPath(dirname(dirname(__FILE__)) . '/application/views/layouts/');
$viewRenderer = new Hoge_Controller_Action_Helper_ViewRenderer($view);
Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);
class HogeController extends Zend_Controller_Action
{
var $layout = 'default';
<html>
<head>
</head>
<body>
<?= $this->contens ?>
</body>
</html>
$this->_helper->viewRenderer->setNoRender();
function indexAction()
{
$this->render();
}
$front = Zend_Controller_Front::getInstance();
$front->setParam('noViewRenderer', true);
Labels: Zend Framework