src/Folder.php
public function createFolder($name, $description = null)
    {
        $client = $this->_client;

        $message = sprintf(
            '%s() is deprecated and will be removed in version 3;'
                . ' use Krizalys\Onedrive\Proxy\DriveItemProxy::createFolder()'
                . ' instead',
            __METHOD__
        );

        @trigger_error($message, E_USER_DEPRECATED);
        $drive   = $client->getMyDrive();
        $item    = $client->getDriveItemById($drive->id, $this->_id);
        $options = [];

        if ($description !== null) {
            $options += [
                'description' => (string) $description,
            ];
        }

        $item    = $item->createFolder($name, $options);
        $options = $client->buildOptions($item, ['parent_id' => $parentId]);

        return new self($client, $item->id, $options);
    }
public function createFolder($name, $description = null)
    {
        $client = $this->_client;

        $message = sprintf(
            '%s() is deprecated and will be removed in version 3;'
                . ' use Krizalys\Onedrive\Proxy\DriveItemProxy::createFolder()'
                . ' instead',
            __METHOD__
        );

        @trigger_error($message, E_USER_DEPRECATED);
        $drive   = $client->getMyDrive();
        $item    = $client->getDriveItemById($drive->id, $this->_id);
        $options = [];

        if ($description !== null) {
            $options += [
                'description' => (string) $description,
            ];
        }

        $item    = $item->createFolder($name, $options);
        $options = $client->buildOptions($item, ['parent_id' => $parentId]);

        return new self($client, $item->id, $options);
    }
public function createFolder ( $ name , $ description = null ) { $ client = $ this -> _client ; $ message = sprintf ( '%s() is deprecated and will be removed in version 3;' . ' use Krizalys\Onedrive\Proxy\DriveItemProxy::createFolder()' . ' instead' , __METHOD__ ) ; @ trigger_error ( $ message , E_USER_DEPRECATED ) ; $ drive = $ client -> getMyDrive ( ) ; $ item = $ client -> getDriveItemById ( $ drive -> id , $ this -> _id ) ; $ options = [ ] ; if ( $ description !== null ) { $ options += [ 'description' => ( string ) $ description , ] ; } $ item = $ item -> createFolder ( $ name , $ options ) ; $ options = $ client -> buildOptions ( $ item , [ 'parent_id' => $ parentId ] ) ; return new self ( $ client , $ item -> id , $ options ) ; }
Creates a folder in the OneDrive folder referenced by this Folder
instance.

@param string $name
The name of the OneDrive folder to be created.
@param null|string $description
The description of the OneDrive folder to be created, or null to
create it without a description. Default: null.

@return Folder
The folder created, as a Folder instance.

@deprecated Use Krizalys\Onedrive\Proxy\DriveItemProxy::createFolder()
instead.
Creates a folder in the OneDrive folder referenced by this Folder instance .