# PostComparator

class PostComparator

Comparator for sort function of `Model\Posts`

## Properties

static | $COMPARABLE_ATTRIBUTES |  |

## Methods

__construct($sortingKey, $sortingOrder = Sorting::ORDER_ASC, $userDefinedTypeOrder = null)

No description

mixed
compare(Post $a, Post $b)

No description

## Details

###
at line 51
`__construct($sortingKey, $sortingOrder = Sorting::ORDER_ASC, $userDefinedTypeOrder = null)`

#### Parameters

| $sortingKey |
| $sortingOrder |
| $userDefinedTypeOrder |

###
at line 64
`mixed compare(Post $a, Post $b)`

#### Parameters

Post | $a |
Post | $b |

#### Return Value

mixed |

#### Exceptions

InvalidSortingTypeException |