On 3/9/11 7:11 PM, 橡树 wrote:
> Hi, all
> I'm learning the plugin development. In
> /statusnet/plugins/Sample/SamplePlugin.php, there is the following
> sentence in onRouterInitialized($m) function.
>
> $m->connect('main/hello', array('action' => 'hello'));
>
> I want to know why the path to connect is 'main/hello' but not others,
> for example 'xxx/yyy' . I read the class Net_URL_Mapper and class
> Net_URL_Mapper_Path, but I didn't work out it. Could you please help me?
> Thanks!
Blue,
Commonly used Actions have been grouped under the main/ path by
convention. You don't have to map your custom actions to that path. You
could use $m->connect('foo/bar/hello', array('action' => 'hello') if you
wanted to have users call http://yoursite.com/foo/bar/hello to execute
the action, for example.
Zach
--
Zach Copley
[email protected] - http://identi.ca/zach
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________ StatusNet-dev mailing list [email protected] http://lists.status.net/mailman/listinfo/statusnet-dev
