Gets the category registry for the given category.

@param pCategory the category class
@return the {@code CategoryRegistry} for the given category
169843
private <T> CategoryRegistry<T> getRegistry(final Class<T> pCategory) {
        @SuppressWarnings({"unchecked"})
        CategoryRegistry<T> registry = categoryMap.get(pCategory);
        if (registry == null) {
            throw new IllegalArgumentException("No such category: " + pCategory.getName());
        }
        return registry;
    }
1265560
public static com.liferay.commerce.product.model.CPTaxCategory deleteCPTaxCategory(
		com.liferay.commerce.product.model.CPTaxCategory cpTaxCategory)
		throws com.liferay.portal.kernel.exception.PortalException {
		return getService().deleteCPTaxCategory(cpTaxCategory);
	}
609981
public function getRoot($categoryId)
    {
        $category = CategoryQuery::create()->findPk($categoryId);

        if (0 !== $category->getParent()) {
            $parentCategory = CategoryQuery::create()->findPk($category->getParent());

            if (null !== $parentCategory) {
                $categoryId = $this->getRoot($parentCategory->getId());
            }
        }

        return $categoryId;
    }
745911
public function getCategoryTree($categoryId = null)
    {
        $method = 'category_tree';

        if ($categoryId !== null) {
            $method .= '/'.$categoryId;
        }

        return $this->call($method);
    }
673594
private function getCurrentCategory()
    {
        $category = false;

        if ($this->registry->registry('current_category') && $this->registry->registry('current_category')->getId()) {
            $category = $this->registry->registry('current_category');
        }

        return $category;
    }
1369853
public boolean register(final Object pProvider) {
        Iterator<Class<?>> categories = compatibleCategories(pProvider);
        boolean registered = false;
        while (categories.hasNext()) {
            Class<?> category = categories.next();
            if (registerImpl(pProvider, category) && !registered) {
                registered = true;
            }
        }
        return registered;
    }
635103
public com.google.api.ads.admanager.axis.v201811.DeviceCategoryTargeting getDeviceCategorySegment() {
        return deviceCategorySegment;
    }
631907
@Override
	public com.liferay.commerce.product.model.CPOptionCategory createCPOptionCategory(
		long CPOptionCategoryId) {
		return _cpOptionCategoryLocalService.createCPOptionCategory(CPOptionCategoryId);
	}
872347
private String getCategoryTerm(String scheme) {
        List<Category> categories = entry.getCategories(scheme);
        if (categories.isEmpty()) {
            return null;
        } else {
            return categories.get(0).getTerm();
        }
    }
1070115
protected static function getRegistry()
    {
        if (self::$registry === null) {
            self::$registry = Doozr_Registry::getInstance();
        }

        return self::$registry;
    }
1087850
@Override
    public RegistrationManager getRegistrationManager(){
        if(registrationManager == null){
            synchronized(this){
                if(registrationManager == null){
                    RegistrationManagerImpl registration = new RegistrationManagerImpl(getDirectoryServiceClientManager());
                    registration.start();
                    registrationManager = registration;
                }
            }
        }
        return registrationManager;
    }
13714
public CategoryOverview getCategories() {
        ClientResource resource = new ClientResource(Route.ALL_CATEGORY.url());

        try {
            Representation repr = resource.get();
            return mapper.readValue(repr.getText(), CategoryOverview.class);
        } catch (IOException ex) {
            LEX4JLogger.log(Level.WARNING, "Could not retrieve the categories correctly!");
            return null;
        }
    }
1336145
public function registerCategory($classname){
		if(!class_exists($classname)){
			return false;
			}
		$obj=new $classname();
		if(empty($obj->alias)){
			return false;
			}
		$this->categories[$obj->alias]=$obj;
		return true;
		}
1242622
public function getByID($akCategoryID)
    {
        $r = $this->entityManager->getRepository(Category::class);

        return $r->findOneBy(['akCategoryID' => $akCategoryID]);
    }
948056
@Override
	public List<ScopDescription> getByCategory(ScopCategory category){

		try {
			ensureDesInstalled();
		} catch (IOException e) {
			throw new ScopIOException(e);
		}

		List<ScopDescription> matches = new ArrayList<ScopDescription>();
		for (Integer i : sunidMap.keySet()){
			ScopDescription sc = sunidMap.get(i);
			if ( sc.getCategory().equals(category))

				try {
					matches.add((ScopDescription)sc.clone());
				} catch (CloneNotSupportedException e) {
					throw new RuntimeException("Could not clone " + ScopDescription.class + " subclass", e);
				}

		}
		return matches;
	}
880842
public com.google.api.ads.admanager.axis.v201902.DeviceCategoryTargeting getDeviceCategoryTargeting() {
        return deviceCategoryTargeting;
    }
563660
public function getIdCategoryNodeByCategoryKey($categoryKey)
    {
        if ($this->categoryKeys->count() === 0) {
            $this->loadCategoryKeys();
        }

        if (!$this->categoryKeys->offsetExists($categoryKey)) {
            throw new CategoryByKeyNotFoundException(sprintf(
                'Category by key "%s" not found. Maybe you have a typo in the category key.',
                $categoryKey
            ));
        }

        return $this->categoryKeys[$categoryKey][static::ID_CATEGORY_NODE];
    }