#!/usr/bin/env php loadModel('dataview'); $statement = new stdclass(); $from = new stdclass(); $from->table = 'bug'; $from->alias = 't1'; $statement->from = array($from); $join = new stdclass(); $join->expr = new stdclass(); $join->expr->table = 'project'; $join->expr->alias = 't2'; $statement->join = array($join); r($tester->dataview->getAliasNames($statement, array('bug' => '', 'project' => ''))) && p('t1;t2') && e('bug,project'); //获取statement中的表名和表别名。