public function map($name, $classDefinition = null)
    {
        // map collection to class
        if ($classDefinition) {
            return $this->defineCollection($name, $classDefinition);
        }

        // map collections to classes
        if (is_array($name)) {
            foreach ($name as $collectionName => $classDefinition) {
                $this->defineCollection($collectionName, $classDefinition);
            }
            return $this;
        }

        // define class prefix
        // deprecated: use class definition
        $this->defineCollection('*', array(
            'class' => $name,
        ));

        return $this;
    }