mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-17 02:10:02 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9471 201d5d3c-b55e-5fd7-737f-ddc643e51545
31 lines
No EOL
795 B
PHP
31 lines
No EOL
795 B
PHP
<?php
|
|
class OrderByColumn {
|
|
var $column_name;
|
|
var $sort_order;
|
|
|
|
function OrderByColumn($column_name, $sort_order){
|
|
$this->column_name = $column_name;
|
|
$this->sort_order = $sort_order;
|
|
}
|
|
|
|
function toString(){
|
|
$result = $this->getColumnName();
|
|
$result .= ' ';
|
|
$result .= is_a($this->sort_order, 'Argument') ? $this->sort_order->getValue() : $this->sort_order;
|
|
return $result;
|
|
}
|
|
|
|
function getColumnName(){
|
|
return is_a($this->column_name, 'Argument') ? $this->column_name->getValue() : $this->column_name;
|
|
}
|
|
|
|
function getArguments(){
|
|
$args = array();
|
|
if(is_a($this->column_name, 'Argument'))
|
|
$args[]= $this->column_name;
|
|
if(is_a($this->sort_order, 'Argument'))
|
|
$args[] = $this->sort_order;
|
|
}
|
|
}
|
|
|
|
?>
|