<?php

class Nmc extends Nmc_Friendly
{
    protected $__friends = array('TestController');
    private $bob = 'test';

    private function bob()
    {
        echo "hi";
    }

    public function __get($key)
    {
        echo "ha ha!";
        return parent::__get($key);
    }

    static public function loadApplicationClass($class, $dirs = null)
    {
        $nameParts = explode('_', $class);
        if($nameParts[0] != 'Application') {
            throw new Nmc_Exception('Not an Application Class.');
        }

        if (class_exists($class, false)) {
            return;
        }

        // autodiscover the path from the class name
        $path = str_replace('_', DIRECTORY_SEPARATOR, $class);
        $path = substr($path, 12);
        if ($dirs === null && $path != $class) {
            // use the autodiscovered path
            $dirs = dirname($path);
            $file = basename($path) . '.php';
        } else {
            $file = $class . '.php';
        }

        self::loadFile($file, $dirs, true);

        if (!class_exists($class, false)) {
            throw new Zend_Exception("File \"$file\" was loaded "
                               . "but class \"$class\" was not found within.");
        }
    }
}

?>