Example #1
0
 public function __construct($prefix = '')
 {
     parent::__construct();
     $map = array(DbViewUsers::USERID => 'id', DbViewUsers::WIKIDOTNAME => 'name');
     if ($prefix && is_string($prefix)) {
         $map = $this->getPrefixedMap($prefix, DbSelectColumns::USER, $map);
     }
     $this->setNamingStrategy(new MapNamingStrategy($map));
 }
 public function __construct($prefix = '')
 {
     parent::__construct();
     $joinDateName = DbViewMembership::JOINDATE;
     if ($prefix && is_string($prefix)) {
         $map = $this->getPrefixedMap($prefix, DbSelectColumns::MEMBERSHIP);
         $this->setNamingStrategy(new MapNamingStrategy($map));
         $joinDateName = $prefix . '_' . $joinDateName;
     }
     $this->addStrategy($joinDateName, new DateTimeFormatterStrategy('Y-m-d H:i:s'));
 }
 public function __construct($prefix = '')
 {
     parent::__construct();
     $map = array(DbViewUserActivity::VOTES => 'voteCount', DbViewUserActivity::REVISIONS => 'revisionCount', DbViewUserActivity::PAGES => 'authorshipCount');
     $lastActivityName = DbViewUserActivity::LASTACTIVITY;
     if ($prefix && is_string($prefix)) {
         $map = $this->getPrefixedMap($prefix, DbSelectColumns::USER_ACTIVITY, $map);
         $lastActivityName = $prefix . '_' . $lastActivityName;
     }
     $this->setNamingStrategy(new MapNamingStrategy($map));
     $this->addStrategy($lastActivityName, new DateTimeFormatterStrategy('Y-m-d H:i:s'));
 }