English 中文(简体)
Kohana的连锁反应没有确定的财产例外。
原标题:Chaining response in Kohana fails with undefined property exception
  • 时间:2011-10-09 22:18:51
  •  标签:
  • php
  • kohana

我似乎无法把一些行动结合起来,特别是这一法典线:

$messages = Request::factory( messages/get_messages )->execute()->response;

当我在浏览器上玩.时,Kohaana没有发出以下警告。

接收通知: 未界定的财产:答复:

The full line of code for this reads...

<?php defined( SYSPATH ) or die( No direct script access. );
  class Controller_Profile extends Controller_Application 
  {
    public function action_index()
    {
      $content = View::factory( profile/public )
        ->set( username ,  Test User )
        ->bind( messages , $messages);
      $messages = Request::factory( messages/get_messages )->execute()->response;
      $this->template->content = $content;
    }
  }

由于我通过,Beginners Guide通过Jason D. Straughan,我已经解决了几个分歧,但从中汲取了一个空白。 这里的任何要点都会受到赞赏。

该书第81页上载有这一行文。

最佳回答

使用:

$messages = Request::factory( messages/get_messages )->execute()->body();

查阅Notice差错的原因是,物体Response(通过<代码>重新编号:要素y(......)->execute()无财产名称为$response(rel=“nofollow”)。 Kohana Docs 3.1 Depts/DGACM/index_russian.htm Kohana Docs 3.2 IED/a>。

问题回答

暂无回答




相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签