} } } // Continue, $r contains argnames and argtypes $args = array(); if ($all) { foreach ($r['argnames'] as $argname) { $args[] = get_magic_quotes_gpc() ? stripslashes($body->{$argname}) : $body->{$argname}; } } if (isset($body->_count) && $body->_count === true) { $args[] = $base->count(); } if (isset($body->_order)) { if (is_object($body->_order)) { $args[] = $base->order($body->_order->col, strtoupper($body->_order->order)); } else { $args[] = $base->order($body->_order); } } if (isset($body->_limit)) { if (is_object($body->_limit)) { $args[] = $base->limit($body->_limit->limit, $body->_limit->offset); } else { $args[] = $base->limit($body->_limit); } } if (isset($body->_distinct)) { $args[] = $base->distinct(); } try {
public function testDistinct() { $in = array(1, 3, 2, 3, 4); $out = self::$base->pgtests->test_integer_array_arg($in, PgProcedures2::distinct(), PgProcedures2::order('test_integer_array_arg')); $this->assertSame(array(1, 2, 3, 4), $out); }