Zend/Gdata/Docs.php
public function createFolder($folderName, $folderResourceId = null)
    {
        $category = new Zend_Gdata_App_Extension_Category(
            self::DOCUMENTS_CATEGORY_TERM,
            self::DOCUMENTS_CATEGORY_SCHEMA
        );
        $title    = new Zend_Gdata_App_Extension_Title($folderName);
        $entry    = new Zend_Gdata_Entry();

        $entry->setCategory(array($category));
        $entry->setTitle($title);

        $uri = self::DOCUMENTS_LIST_FEED_URI;
        if ($folderResourceId != null) {
            $uri = self::DOCUMENTS_FOLDER_FEED_URI . '/' . $folderResourceId;
        }

        return $this->insertEntry($entry, $uri);
    }
public function createFolder($folderName, $folderResourceId = null)
    {
        $category = new Zend_Gdata_App_Extension_Category(
            self::DOCUMENTS_CATEGORY_TERM,
            self::DOCUMENTS_CATEGORY_SCHEMA
        );
        $title    = new Zend_Gdata_App_Extension_Title($folderName);
        $entry    = new Zend_Gdata_Entry();

        $entry->setCategory(array($category));
        $entry->setTitle($title);

        $uri = self::DOCUMENTS_LIST_FEED_URI;
        if ($folderResourceId != null) {
            $uri = self::DOCUMENTS_FOLDER_FEED_URI . '/' . $folderResourceId;
        }

        return $this->insertEntry($entry, $uri);
    }
public function createFolder ( $ folderName , $ folderResourceId = null ) { $ category = new Zend_Gdata_App_Extension_Category ( self :: DOCUMENTS_CATEGORY_TERM , self :: DOCUMENTS_CATEGORY_SCHEMA ) ; $ title = new Zend_Gdata_App_Extension_Title ( $ folderName ) ; $ entry = new Zend_Gdata_Entry ( ) ; $ entry -> setCategory ( array ( $ category ) ) ; $ entry -> setTitle ( $ title ) ; $ uri = self :: DOCUMENTS_LIST_FEED_URI ; if ( $ folderResourceId != null ) { $ uri = self :: DOCUMENTS_FOLDER_FEED_URI . '/' . $ folderResourceId ; } return $ this -> insertEntry ( $ entry , $ uri ) ; }
Creates a new folder in Google Docs

@param string $folderName The folder name to create
@param string|null $folderResourceId The parent folder to create it in
("folder%3Amy_parent_folder")
@return Zend_Gdata_Entry The folder entry created.
@todo ZF-8732: This should return a *subclass* of Zend_Gdata_Entry, but
the appropriate type doesn't exist yet.
Creates a new folder in Google Docs