/** * Creates filtered table representation. * @param string database table name * @param NConnection */ public function __construct($table, NConnection $connection) { $this->name = $table; $this->connection = $connection; $reflection = $connection->getDatabaseReflection(); $this->primary = $reflection->getPrimary($table); $this->sqlBuilder = new NSqlBuilder($table, $connection, $reflection); $this->cache = $connection->getCache(); }