SproutCMS

This is the code documentation for the SproutCMS project

function nsNew()

Creates an object of a class specified by a string name, with a list of possible namespaces to lookup if the
specified class name doesn't contain a namespace

Usage

object Sprout::nsNew ( string $class , array $possible_nses );

Arguments

  1. string $class
    The class to instantiate
  2. array $possible_nses
    Possible namespaces to try

Exceptions thrown

  • Exception
    if the class lookup failed

Return value

  • object