private function generateSortByPropertyClosure( $property, $direction = SORT_ASC )
    {

        if( $direction === SORT_DESC ) {
            $aLTb = 1;
            $aGTb = -1;
        } else {
            $aLTb = -1;
            $aGTb = 1;
        }

        $mapper = $this->getPropertyMapper($property);

        return function ( $a, $b ) use ( $mapper, $aLTb, $aGTb ) {
            $propertyA = $mapper->get($a);
            $propertyB = $mapper->get($b);
            if( $propertyA === $propertyB ) {
                return 0;
            }
            return ( $propertyA < $propertyB ) ? $aLTb : $aGTb;
        };

    }