public function findByFilterComponentsFormatReturnValue( $qty, Container $output )
    {

        if( $qty === FindFilterComponentFactory::FIND_ALL ) {
            return $output;
        }

        switch( $count = count( $output ) ) {
            case 0:
                return null;
            case 1:
                return $output->pop();
        }

        throw new IncompatibleQtyException( "{$count} entities found - can't return 'one'" );

    }
public function findByFilterComponentsFormatReturnValue( $qty, Container $output )
    {

        if( $qty === FindFilterComponentFactory::FIND_ALL ) {
            return $output;
        }

        switch( $count = count( $output ) ) {
            case 0:
                return null;
            case 1:
                return $output->pop();
        }

        throw new IncompatibleQtyException( "{$count} entities found - can't return 'one'" );

    }
public function findByFilterComponentsFormatReturnValue ( $ qty , Container $ output ) { if ( $ qty === FindFilterComponentFactory :: FIND_ALL ) { return $ output ; } switch ( $ count = count ( $ output ) ) { case 0 : return null ; case 1 : return $ output -> pop ( ) ; } throw new IncompatibleQtyException ( "{$count} entities found - can't return 'one'" ) ; }
Format the return value of a findByFilterComponents query
@param self::FIND_ALL|FIND_ONE $qty
@param Container $output
@return Container
Format the return value of a findByFilterComponents query