public function addAssignment($taskUid, $resourceUid, $units, $changedFileName = '')
    {
        if ($taskUid == '')
            throw new Exception('Task Uid not specified');

        if ($resourceUid == '')
            throw new Exception('Resource Uid not specified');

        //build URI 
        $strURI = Product::$baseProductUri . '/tasks/' . $this->getFileName() . '/assignments?taskUid=' . $taskUid . '&resourceUid=' . $resourceUid . '&units' . $units;
        if ($changedFileName != '') {
            $strURI .= '&fileName=' . $changedFileName;
            $this->setFileName($changedFileName);
        }

        //sign URI
        $signedURI = Utils::sign($strURI);

        $responseStream = Utils::processCommand($signedURI, 'POST', '', '');

        $v_output = Utils::validateOutput($responseStream);

        if ($v_output === '') {
            $folder = new Folder();
            $outputStream = $folder->GetFile($this->getFileName());
            $outputPath = AsposeApp::$outPutLocation . $this->getFileName();
            Utils::saveFile($outputStream, $outputPath);
            return $outputPath;
        } else
            return $v_output;
    }
public function addAssignment($taskUid, $resourceUid, $units, $changedFileName = '')
    {
        if ($taskUid == '')
            throw new Exception('Task Uid not specified');

        if ($resourceUid == '')
            throw new Exception('Resource Uid not specified');

        //build URI 
        $strURI = Product::$baseProductUri . '/tasks/' . $this->getFileName() . '/assignments?taskUid=' . $taskUid . '&resourceUid=' . $resourceUid . '&units' . $units;
        if ($changedFileName != '') {
            $strURI .= '&fileName=' . $changedFileName;
            $this->setFileName($changedFileName);
        }

        //sign URI
        $signedURI = Utils::sign($strURI);

        $responseStream = Utils::processCommand($signedURI, 'POST', '', '');

        $v_output = Utils::validateOutput($responseStream);

        if ($v_output === '') {
            $folder = new Folder();
            $outputStream = $folder->GetFile($this->getFileName());
            $outputPath = AsposeApp::$outPutLocation . $this->getFileName();
            Utils::saveFile($outputStream, $outputPath);
            return $outputPath;
        } else
            return $v_output;
    }
public function addAssignment ( $ taskUid , $ resourceUid , $ units , $ changedFileName = '' ) { if ( $ taskUid == '' ) throw new Exception ( 'Task Uid not specified' ) ; if ( $ resourceUid == '' ) throw new Exception ( 'Resource Uid not specified' ) ; //build URI  $ strURI = Product :: $ baseProductUri . '/tasks/' . $ this -> getFileName ( ) . '/assignments?taskUid=' . $ taskUid . '&resourceUid=' . $ resourceUid . '&units' . $ units ; if ( $ changedFileName != '' ) { $ strURI .= '&fileName=' . $ changedFileName ; $ this -> setFileName ( $ changedFileName ) ; } //sign URI $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'POST' , '' , '' ) ; $ v_output = Utils :: validateOutput ( $ responseStream ) ; if ( $ v_output === '' ) { $ folder = new Folder ( ) ; $ outputStream = $ folder -> GetFile ( $ this -> getFileName ( ) ) ; $ outputPath = AsposeApp :: $ outPutLocation . $ this -> getFileName ( ) ; Utils :: saveFile ( $ outputStream , $ outputPath ) ; return $ outputPath ; } else return $ v_output ; }
Adds a new assignment to a project.

@param integer $taskUid The unique id of the task to be assigned.
@param integer $resourceUid The unique id of the resource to be assigned.
@param double $units The units for the new assignment. Default value is 1.
@param string $changedFileName The name of the project document to save changes to. If this parameter is omitted then the changes will be saved to the source project document.

@return string Returns the file path.
@throws Exception
Adds a new assignment to a project .