public function generatePsr0ClassUnder($directory, array $args = array())
    {
        $code = "<?php\n" . $this->render($args);
        $classPath = $this->getPsr0ClassPath();
        $path = $directory . DIRECTORY_SEPARATOR . $classPath;
        if ($dir = dirname($path)) {
            if (!file_exists($dir)) {
                mkdir($dir, 0755, true);
            }
        }
        if (file_put_contents($path, $code) === false) {
            return false;
        }
        return $path;
    }