GoLang MongoDB\BSON\Javascript::getCode

request it (390)
GoLang replacement for PHP's MongoDB\BSON\Javascript::getCode [edit | history]



Do you know a GoLang replacement for PHP's MongoDB\BSON\Javascript::getCode? Write it!

PHP MongoDB\BSON\Javascript::getCode

PHP original manual for MongoDB\BSON\Javascript::getCode [ show | php.net ]

MongoDB\BSON\Javascript::getCode

(mongodb >=1.2.0)

MongoDB\BSON\Javascript::getCodeReturns the Javascript's code

Description

final public string MongoDB\BSON\Javascript::getCode ( void )

Parameters

This function has no parameters.

Return Values

Returns the Javascript's code.

Errors/Exceptions

Examples

Example #1 MongoDB\BSON\Javascript::getCode() example

<?php

$js 
= new MongoDB\BSON\Javascript('function foo(bar) { return bar; }');
var_dump($js->getCode());

?>

The above example will output:

string(33) "function foo(bar) { return bar; }"

See Also