symfony PHPフレームワークpart2
■ このスレッドは過去ログ倉庫に格納されています
0273nobodyさん
2010/11/17(水) 05:46:56ID:???#accessTask.class.php
<?php
class accessTask extends sfBaseTask
{
public function configure()
{
$this->namespace = 'link';
$this->name = 'access';
$this->addArgument('username', sfCommandArgument::OPTIONAL);
$this->addArgument('ip', sfCommandArgument::OPTIONAL);
}
public function execute($arguments = array(), $options = array())
{
$access = new Accesslog();
$access->setUsername($arguments['username']);
$access->setIp($arguments['ip']);
$access->save();
$this->log('access from '. $arguments['ip']);
}
}
■ このスレッドは過去ログ倉庫に格納されています