예제 #1
0
 public static function create($name, $location, $message, $tinyUrl = null)
 {
     $visitor = new Visitor(null);
     $visitor->setName($name);
     $visitor->setLocation($location);
     $visitor->setMessage($message);
     $visitor->setTinyUrl($tinyUrl);
     $visitor->setGeneratedId($visitor->generateId());
     $visitor->setId($visitor->save());
     return $visitor;
 }