SproutCMS

This is the code documentation for the SproutCMS project

function lookupOrCreate()

Looks up a category. If not found, creates the category.
Returns the id or NULL on failure.

Usage

unknown Category::lookupOrCreate ( string $table , string $name [, bool $case_sensitive ] );

Arguments

  1. string $table
    The 'main' table (e.g. 'articles')
  2. string $name
    The name of the category to find or add
  3. bool $case_sensitive = FALSE
    True for a case sensitive match. Default false