public function getServiceNamesByType($types, $only_active = false)
    {
        $names = [];
        $map = $this->getServiceNameTypeMap($only_active);
        if (is_string($types)) {
            $types = array_map('trim', explode(',', trim($types, ',')));
        }
        foreach ($map as $name => $type) {
            if (false !== array_search($type, $types)) {
                $names[] = $name;
            }
        }

        return $names;
    }
public function getServiceNamesByType($types, $only_active = false)
    {
        $names = [];
        $map = $this->getServiceNameTypeMap($only_active);
        if (is_string($types)) {
            $types = array_map('trim', explode(',', trim($types, ',')));
        }
        foreach ($map as $name => $type) {
            if (false !== array_search($type, $types)) {
                $names[] = $name;
            }
        }

        return $names;
    }
public function getServiceNamesByType ( $ types , $ only_active = false ) { $ names = [ ] ; $ map = $ this -> getServiceNameTypeMap ( $ only_active ) ; if ( is_string ( $ types ) ) { $ types = array_map ( 'trim' , explode ( ',' , trim ( $ types , ',' ) ) ) ; } foreach ( $ map as $ name => $ type ) { if ( false !== array_search ( $ type , $ types ) ) { $ names [ ] = $ name ; } } return $ names ; }
Return all of the created service names by type.

@param string|array $types
@param bool         $only_active

@return array
Return all of the created service names by type .