[Codeigniter-users] ユーザガイドの修正(general/controllers.html#remapping)

Zurück zum Archiv-Index

Kenichi Ando(Neo,Inc) ando****@neo-n*****
2007年 12月 5日 (水) 22:22:54 JST


bossatamaです。

On Wed, 5 Dec 2007 21:37:14 +0900
Kenji <kenji****@club*****> wrote:

> Kenji です。
> 
> 
> On Wed, 5 Dec 2007 20:50:52 +0900
> Kenji <kenji****@club*****> wrote:
> 
> > > trunkのユーザガイドを参照しましたが、同じでした。
> > > 
> > > general/controllers.html#remapping
> > > 
> > > In sample code:
> > > function _remap($method)
> > > {
> > >     if ($method == 'some_method')
> > >     {
> > >         $this->$method();
> > >     }
> > >     else
> > >     {
> > >         $this->default_method();
> > >     }
> > > }
> > > 
> > > は
> > > $this->$method();が
> > > $this->method();
> > > 
> > > だと思われます。いかがでしょうか。
> > 
> > typo ですね。
> 
> と書きましたが、typo でなくてこれで正しい?
> 

methodやdefault_methodは架空のメンバー関数ですし、
$this->$のような使い方は、foreachのようなケースで
使われるのではないでしょうか?
this変数の次は関数名だと思います。


//bossatama




Codeigniter-users メーリングリストの案内
Zurück zum Archiv-Index