protected function sortValidationtypes(array $validationTypes)
    {
        // prepare validationtypes for ordering (remove not orderable items)
        $splittedValidationtypes = $this->splitForOrder($validationTypes);

        // set sortabel items to sortable for further processing
        $sortable = $splittedValidationtypes['sortable'];

        // extract just the keys from given set of validation(s)
        $sortable = array_keys($sortable);

        // sort the components by our preferred order to speed up validation
        usort($sortable, ['self', '_compareValidationtypes']);

        // add previously removed items
        foreach ($splittedValidationtypes['nonsortable'] as $validationtype => $value) {
            $sortable[] = [
                $validationtype => $value,
            ];
        }

        // return ordered list
        return $sortable;
    }
protected function sortValidationtypes(array $validationTypes)
    {
        // prepare validationtypes for ordering (remove not orderable items)
        $splittedValidationtypes = $this->splitForOrder($validationTypes);

        // set sortabel items to sortable for further processing
        $sortable = $splittedValidationtypes['sortable'];

        // extract just the keys from given set of validation(s)
        $sortable = array_keys($sortable);

        // sort the components by our preferred order to speed up validation
        usort($sortable, ['self', '_compareValidationtypes']);

        // add previously removed items
        foreach ($splittedValidationtypes['nonsortable'] as $validationtype => $value) {
            $sortable[] = [
                $validationtype => $value,
            ];
        }

        // return ordered list
        return $sortable;
    }
protected function sortValidationtypes ( array $ validationTypes ) { // prepare validationtypes for ordering (remove not orderable items) $ splittedValidationtypes = $ this -> splitForOrder ( $ validationTypes ) ; // set sortabel items to sortable for further processing $ sortable = $ splittedValidationtypes [ 'sortable' ] ; // extract just the keys from given set of validation(s) $ sortable = array_keys ( $ sortable ) ; // sort the components by our preferred order to speed up validation usort ( $ sortable , [ 'self' , '_compareValidationtypes' ] ) ; // add previously removed items foreach ( $ splittedValidationtypes [ 'nonsortable' ] as $ validationtype => $ value ) { $ sortable [ ] = [ $ validationtype => $ value , ] ; } // return ordered list return $ sortable ; }
Orders the given set of validation-types.

@param array $validationTypes The validation-types to order

@author Benjamin Carl <opensource@clickalicious.de>

@return array The ordered list of validation-types
Orders the given set of validation - types .