id int32 0 241k | repo stringlengths 6 63 | path stringlengths 5 140 | func_name stringlengths 3 151 | original_string stringlengths 84 13k | language stringclasses 1
value | code stringlengths 84 13k | code_tokens list | docstring stringlengths 3 47.2k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 91 247 |
|---|---|---|---|---|---|---|---|---|---|---|---|
221,300 | colinmollenhour/mongodb-php-odm | classes/mongo/document.php | Mongo_Document.as_array | public function as_array( $clean = FALSE )
{
if($clean === TRUE)
{
$array = $this->_object;
}
else
{
$array = array();
foreach($this->_object as $name => $value)
{
$array[$name] = isset($this->_object[$name]) ? $this->_object[$name] : NULL;
}
foreach($th... | php | public function as_array( $clean = FALSE )
{
if($clean === TRUE)
{
$array = $this->_object;
}
else
{
$array = array();
foreach($this->_object as $name => $value)
{
$array[$name] = isset($this->_object[$name]) ? $this->_object[$name] : NULL;
}
foreach($th... | [
"public",
"function",
"as_array",
"(",
"$",
"clean",
"=",
"FALSE",
")",
"{",
"if",
"(",
"$",
"clean",
"===",
"TRUE",
")",
"{",
"$",
"array",
"=",
"$",
"this",
"->",
"_object",
";",
"}",
"else",
"{",
"$",
"array",
"=",
"array",
"(",
")",
";",
"f... | Get the model data as an associative array.
@param boolean $clean retrieve values directly from _object
@return array field => value | [
"Get",
"the",
"model",
"data",
"as",
"an",
"associative",
"array",
"."
] | 640ce82c0ab00765168addec1bf0b996bdb4e4d1 | https://github.com/colinmollenhour/mongodb-php-odm/blob/640ce82c0ab00765168addec1bf0b996bdb4e4d1/classes/mongo/document.php#L1139-L1163 |
221,301 | colinmollenhour/mongodb-php-odm | classes/mongo/document.php | Mongo_Document._update_references | protected function _update_references()
{
foreach($this->_references as $name => $ref)
{
if(isset($this->_related_objects[$name]) && $this->_related_objects[$name] instanceof Mongo_Document)
{
$model = $this->_related_objects[$name];
$id_field = isset($ref['field']) ? $ref['field']... | php | protected function _update_references()
{
foreach($this->_references as $name => $ref)
{
if(isset($this->_related_objects[$name]) && $this->_related_objects[$name] instanceof Mongo_Document)
{
$model = $this->_related_objects[$name];
$id_field = isset($ref['field']) ? $ref['field']... | [
"protected",
"function",
"_update_references",
"(",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"_references",
"as",
"$",
"name",
"=>",
"$",
"ref",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"_related_objects",
"[",
"$",
"name",
"]",
")",
... | Updates references but does not save models to avoid infinite loops | [
"Updates",
"references",
"but",
"does",
"not",
"save",
"models",
"to",
"avoid",
"infinite",
"loops"
] | 640ce82c0ab00765168addec1bf0b996bdb4e4d1 | https://github.com/colinmollenhour/mongodb-php-odm/blob/640ce82c0ab00765168addec1bf0b996bdb4e4d1/classes/mongo/document.php#L1359-L1373 |
221,302 | colinmollenhour/mongodb-php-odm | classes/mongo/document.php | Mongo_Document.upsert | public function upsert($operations = array())
{
if( ! $this->_object)
{
throw new MongoException('Cannot upsert '.get_class($this).': no criteria');
}
$this->before_save(self::SAVE_UPSERT);
$operations = self::array_merge_recursive_distinct($this->_operations, $operations);
if( ! $thi... | php | public function upsert($operations = array())
{
if( ! $this->_object)
{
throw new MongoException('Cannot upsert '.get_class($this).': no criteria');
}
$this->before_save(self::SAVE_UPSERT);
$operations = self::array_merge_recursive_distinct($this->_operations, $operations);
if( ! $thi... | [
"public",
"function",
"upsert",
"(",
"$",
"operations",
"=",
"array",
"(",
")",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_object",
")",
"{",
"throw",
"new",
"MongoException",
"(",
"'Cannot upsert '",
".",
"get_class",
"(",
"$",
"this",
")",
".",
... | Upsert the document, does not retrieve the _id of the upserted document.
@param array $operations
@throws MongoException
@return Mongo_Document | [
"Upsert",
"the",
"document",
"does",
"not",
"retrieve",
"the",
"_id",
"of",
"the",
"upserted",
"document",
"."
] | 640ce82c0ab00765168addec1bf0b996bdb4e4d1 | https://github.com/colinmollenhour/mongodb-php-odm/blob/640ce82c0ab00765168addec1bf0b996bdb4e4d1/classes/mongo/document.php#L1416-L1438 |
221,303 | colinmollenhour/mongodb-php-odm | classes/mongo/document.php | Mongo_Document.unset_named_reference | public static function unset_named_reference(&$arr, $name)
{
$keys = explode('.', $name);
$data = & $arr;
foreach ($keys as $i => $key)
{
if (isset($data[$key]))
{
if ($i == count($keys) - 1)
{
unset($data[$key]);
return;
}
$data = & $dat... | php | public static function unset_named_reference(&$arr, $name)
{
$keys = explode('.', $name);
$data = & $arr;
foreach ($keys as $i => $key)
{
if (isset($data[$key]))
{
if ($i == count($keys) - 1)
{
unset($data[$key]);
return;
}
$data = & $dat... | [
"public",
"static",
"function",
"unset_named_reference",
"(",
"&",
"$",
"arr",
",",
"$",
"name",
")",
"{",
"$",
"keys",
"=",
"explode",
"(",
"'.'",
",",
"$",
"name",
")",
";",
"$",
"data",
"=",
"&",
"$",
"arr",
";",
"foreach",
"(",
"$",
"keys",
"... | Unsets a field using dot notation
@param array $arr Array with data
@param string $name Dot notation name | [
"Unsets",
"a",
"field",
"using",
"dot",
"notation"
] | 640ce82c0ab00765168addec1bf0b996bdb4e4d1 | https://github.com/colinmollenhour/mongodb-php-odm/blob/640ce82c0ab00765168addec1bf0b996bdb4e4d1/classes/mongo/document.php#L1562-L1582 |
221,304 | Inpassor/yii2-daemon | Controller.php | Controller._getPid | protected function _getPid()
{
if (!file_exists($this->_pidFile)) {
return false;
}
return (($this->_pid = file_get_contents($this->_pidFile)) && posix_kill($this->_pid, 0)) ? $this->_pid : false;
} | php | protected function _getPid()
{
if (!file_exists($this->_pidFile)) {
return false;
}
return (($this->_pid = file_get_contents($this->_pidFile)) && posix_kill($this->_pid, 0)) ? $this->_pid : false;
} | [
"protected",
"function",
"_getPid",
"(",
")",
"{",
"if",
"(",
"!",
"file_exists",
"(",
"$",
"this",
"->",
"_pidFile",
")",
")",
"{",
"return",
"false",
";",
"}",
"return",
"(",
"(",
"$",
"this",
"->",
"_pid",
"=",
"file_get_contents",
"(",
"$",
"this... | Gets the PID of the main process, false on fail.
@return bool|string | [
"Gets",
"the",
"PID",
"of",
"the",
"main",
"process",
"false",
"on",
"fail",
"."
] | a8efd68efa48e74295ff359938120ac12e1fb1bf | https://github.com/Inpassor/yii2-daemon/blob/a8efd68efa48e74295ff359938120ac12e1fb1bf/Controller.php#L84-L90 |
221,305 | Inpassor/yii2-daemon | Controller.php | Controller._killPid | protected function _killPid()
{
if (file_exists($this->_pidFile)) {
unlink($this->_pidFile);
}
if ($this->_pid) {
posix_kill($this->_pid, SIGTERM);
}
} | php | protected function _killPid()
{
if (file_exists($this->_pidFile)) {
unlink($this->_pidFile);
}
if ($this->_pid) {
posix_kill($this->_pid, SIGTERM);
}
} | [
"protected",
"function",
"_killPid",
"(",
")",
"{",
"if",
"(",
"file_exists",
"(",
"$",
"this",
"->",
"_pidFile",
")",
")",
"{",
"unlink",
"(",
"$",
"this",
"->",
"_pidFile",
")",
";",
"}",
"if",
"(",
"$",
"this",
"->",
"_pid",
")",
"{",
"posix_kil... | Tries to kill the PID of the main process. | [
"Tries",
"to",
"kill",
"the",
"PID",
"of",
"the",
"main",
"process",
"."
] | a8efd68efa48e74295ff359938120ac12e1fb1bf | https://github.com/Inpassor/yii2-daemon/blob/a8efd68efa48e74295ff359938120ac12e1fb1bf/Controller.php#L95-L103 |
221,306 | Inpassor/yii2-daemon | Controller.php | Controller._getWorkers | protected function _getWorkers()
{
foreach ($this->workersMap as $workerUid => $workerConfig) {
if (is_string($workerConfig)) {
$workerConfig = [
'class' => $workerConfig,
];
}
if (
!isset($workerConfig['... | php | protected function _getWorkers()
{
foreach ($this->workersMap as $workerUid => $workerConfig) {
if (is_string($workerConfig)) {
$workerConfig = [
'class' => $workerConfig,
];
}
if (
!isset($workerConfig['... | [
"protected",
"function",
"_getWorkers",
"(",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"workersMap",
"as",
"$",
"workerUid",
"=>",
"$",
"workerConfig",
")",
"{",
"if",
"(",
"is_string",
"(",
"$",
"workerConfig",
")",
")",
"{",
"$",
"workerConfig",
"="... | Gets all the daemon workers. | [
"Gets",
"all",
"the",
"daemon",
"workers",
"."
] | a8efd68efa48e74295ff359938120ac12e1fb1bf | https://github.com/Inpassor/yii2-daemon/blob/a8efd68efa48e74295ff359938120ac12e1fb1bf/Controller.php#L108-L144 |
221,307 | Inpassor/yii2-daemon | Controller.php | Controller.signalHandler | public static function signalHandler($signo, $pid = null, $status = null)
{
switch ($signo) {
case SIGTERM:
case SIGINT:
static::$_stop = true;
break;
case SIGCHLD:
if (!$pid) {
$pid = pcntl_waitpid(-1, $... | php | public static function signalHandler($signo, $pid = null, $status = null)
{
switch ($signo) {
case SIGTERM:
case SIGINT:
static::$_stop = true;
break;
case SIGCHLD:
if (!$pid) {
$pid = pcntl_waitpid(-1, $... | [
"public",
"static",
"function",
"signalHandler",
"(",
"$",
"signo",
",",
"$",
"pid",
"=",
"null",
",",
"$",
"status",
"=",
"null",
")",
"{",
"switch",
"(",
"$",
"signo",
")",
"{",
"case",
"SIGTERM",
":",
"case",
"SIGINT",
":",
"static",
"::",
"$",
... | PNCTL signal handler.
@param $signo
@param $pid
@param $status | [
"PNCTL",
"signal",
"handler",
"."
] | a8efd68efa48e74295ff359938120ac12e1fb1bf | https://github.com/Inpassor/yii2-daemon/blob/a8efd68efa48e74295ff359938120ac12e1fb1bf/Controller.php#L206-L227 |
221,308 | Inpassor/yii2-daemon | Controller.php | Controller.actionBoobs | public function actionBoobs()
{
if ($boobs = FileHelper::findFiles(__DIR__ . DIRECTORY_SEPARATOR . 'boobs', ['only' => ['boobs*.bin']])) {
$b = $boobs[mt_rand(0, count($boobs) - 1)];
echo gzuncompress(file_get_contents($b));
}
return static::EXIT_CODE_NORMAL;
} | php | public function actionBoobs()
{
if ($boobs = FileHelper::findFiles(__DIR__ . DIRECTORY_SEPARATOR . 'boobs', ['only' => ['boobs*.bin']])) {
$b = $boobs[mt_rand(0, count($boobs) - 1)];
echo gzuncompress(file_get_contents($b));
}
return static::EXIT_CODE_NORMAL;
} | [
"public",
"function",
"actionBoobs",
"(",
")",
"{",
"if",
"(",
"$",
"boobs",
"=",
"FileHelper",
"::",
"findFiles",
"(",
"__DIR__",
".",
"DIRECTORY_SEPARATOR",
".",
"'boobs'",
",",
"[",
"'only'",
"=>",
"[",
"'boobs*.bin'",
"]",
"]",
")",
")",
"{",
"$",
... | The daemon boobs.
@return int | [
"The",
"daemon",
"boobs",
"."
] | a8efd68efa48e74295ff359938120ac12e1fb1bf | https://github.com/Inpassor/yii2-daemon/blob/a8efd68efa48e74295ff359938120ac12e1fb1bf/Controller.php#L233-L240 |
221,309 | Inpassor/yii2-daemon | Controller.php | Controller.actionStop | public function actionStop()
{
$message = 'Stopping Yii 2 Daemon ' . $this->version . '... ';
$result = static::EXIT_CODE_NORMAL;
if ($this->_getPid() !== false) {
$this->_killPid();
$message .= 'OK.';
} else {
$message .= 'Service is not running!'... | php | public function actionStop()
{
$message = 'Stopping Yii 2 Daemon ' . $this->version . '... ';
$result = static::EXIT_CODE_NORMAL;
if ($this->_getPid() !== false) {
$this->_killPid();
$message .= 'OK.';
} else {
$message .= 'Service is not running!'... | [
"public",
"function",
"actionStop",
"(",
")",
"{",
"$",
"message",
"=",
"'Stopping Yii 2 Daemon '",
".",
"$",
"this",
"->",
"version",
".",
"'... '",
";",
"$",
"result",
"=",
"static",
"::",
"EXIT_CODE_NORMAL",
";",
"if",
"(",
"$",
"this",
"->",
"_getPid",... | The daemon stop command.
@return int | [
"The",
"daemon",
"stop",
"command",
"."
] | a8efd68efa48e74295ff359938120ac12e1fb1bf | https://github.com/Inpassor/yii2-daemon/blob/a8efd68efa48e74295ff359938120ac12e1fb1bf/Controller.php#L352-L366 |
221,310 | Inpassor/yii2-daemon | Controller.php | Controller.actionStatus | public function actionStatus()
{
if ($this->_getPid()) {
echo 'Yii 2 Daemon ' . $this->version . ' status: running.' . PHP_EOL;
return static::EXIT_CODE_NORMAL;
}
echo 'Yii 2 Daemon ' . $this->version . ' status: not running!' . PHP_EOL;
return static::EXIT_CO... | php | public function actionStatus()
{
if ($this->_getPid()) {
echo 'Yii 2 Daemon ' . $this->version . ' status: running.' . PHP_EOL;
return static::EXIT_CODE_NORMAL;
}
echo 'Yii 2 Daemon ' . $this->version . ' status: not running!' . PHP_EOL;
return static::EXIT_CO... | [
"public",
"function",
"actionStatus",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"_getPid",
"(",
")",
")",
"{",
"echo",
"'Yii 2 Daemon '",
".",
"$",
"this",
"->",
"version",
".",
"' status: running.'",
".",
"PHP_EOL",
";",
"return",
"static",
"::",
"EX... | The daemon status command.
@return int | [
"The",
"daemon",
"status",
"command",
"."
] | a8efd68efa48e74295ff359938120ac12e1fb1bf | https://github.com/Inpassor/yii2-daemon/blob/a8efd68efa48e74295ff359938120ac12e1fb1bf/Controller.php#L382-L390 |
221,311 | PHPixie/Framework | src/PHPixie/Framework/Processors/HTTP/Response/Exception.php | Exception.process | public function process($exception)
{
$templateName = $this->configData->getRequired('template');
$trace = $this->debug->exceptionTrace($exception);
$body = $this->template->render(
$templateName,
array(
'exception' => $exception,
... | php | public function process($exception)
{
$templateName = $this->configData->getRequired('template');
$trace = $this->debug->exceptionTrace($exception);
$body = $this->template->render(
$templateName,
array(
'exception' => $exception,
... | [
"public",
"function",
"process",
"(",
"$",
"exception",
")",
"{",
"$",
"templateName",
"=",
"$",
"this",
"->",
"configData",
"->",
"getRequired",
"(",
"'template'",
")",
";",
"$",
"trace",
"=",
"$",
"this",
"->",
"debug",
"->",
"exceptionTrace",
"(",
"$"... | Builds a response for an exception
@param \Exception $exception
@return \PHPixie\HTTP\Responses\Response | [
"Builds",
"a",
"response",
"for",
"an",
"exception"
] | f9bce1beffb09fe386e5d62d124aea042346001f | https://github.com/PHPixie/Framework/blob/f9bce1beffb09fe386e5d62d124aea042346001f/src/PHPixie/Framework/Processors/HTTP/Response/Exception.php#L50-L65 |
221,312 | PHPixie/Framework | src/PHPixie/Framework/Processors/HTTP/ParseRoute.php | ParseRoute.process | public function process($serverRequest)
{
$match = $this->routeTranslator->match($serverRequest);
if($match !== null) {
$attributes = $match->attributes();
$attributes['routeResolverPath'] = $match->resolverPath();
foreach($attributes as $key => $value) ... | php | public function process($serverRequest)
{
$match = $this->routeTranslator->match($serverRequest);
if($match !== null) {
$attributes = $match->attributes();
$attributes['routeResolverPath'] = $match->resolverPath();
foreach($attributes as $key => $value) ... | [
"public",
"function",
"process",
"(",
"$",
"serverRequest",
")",
"{",
"$",
"match",
"=",
"$",
"this",
"->",
"routeTranslator",
"->",
"match",
"(",
"$",
"serverRequest",
")",
";",
"if",
"(",
"$",
"match",
"!==",
"null",
")",
"{",
"$",
"attributes",
"=",... | Matches routes and sets request attributes
@param ServerRequestInterface $serverRequest
@return ServerRequestInterface | [
"Matches",
"routes",
"and",
"sets",
"request",
"attributes"
] | f9bce1beffb09fe386e5d62d124aea042346001f | https://github.com/PHPixie/Framework/blob/f9bce1beffb09fe386e5d62d124aea042346001f/src/PHPixie/Framework/Processors/HTTP/ParseRoute.php#L32-L46 |
221,313 | mysql-workbench-schema-exporter/doctrine2-exporter | lib/MwbExporter/Formatter/Doctrine2/Formatter.php | Formatter.isOwningSide | public function isOwningSide($relation, &$mappedRelation)
{
$mappedRelation = $relation['reference']->getOwningTable()->getRelationToTable($relation['refTable']->getRawTableName());
// user can hint which side is the owning side (set d:owningSide on the foreign key)
if ($relation['reference... | php | public function isOwningSide($relation, &$mappedRelation)
{
$mappedRelation = $relation['reference']->getOwningTable()->getRelationToTable($relation['refTable']->getRawTableName());
// user can hint which side is the owning side (set d:owningSide on the foreign key)
if ($relation['reference... | [
"public",
"function",
"isOwningSide",
"(",
"$",
"relation",
",",
"&",
"$",
"mappedRelation",
")",
"{",
"$",
"mappedRelation",
"=",
"$",
"relation",
"[",
"'reference'",
"]",
"->",
"getOwningTable",
"(",
")",
"->",
"getRelationToTable",
"(",
"$",
"relation",
"... | Get owning side of relation.
@param array $relation
@param \MwbExporter\Model\ForeignKey $mappedRelation
@return boolean | [
"Get",
"owning",
"side",
"of",
"relation",
"."
] | a62b13cbf4824c05cc791034ffedf419242ba0cb | https://github.com/mysql-workbench-schema-exporter/doctrine2-exporter/blob/a62b13cbf4824c05cc791034ffedf419242ba0cb/lib/MwbExporter/Formatter/Doctrine2/Formatter.php#L115-L129 |
221,314 | mysql-workbench-schema-exporter/doctrine2-exporter | lib/MwbExporter/Formatter/Doctrine2/Formatter.php | Formatter.getCascadeOption | public function getCascadeOption($cascadeValue)
{
$defaultCascade = $this->getRegistry()->config->get(static::CFG_DEFAULT_CASCADE);
if (empty($cascadeValue) && !empty($defaultCascade)) {
return [$defaultCascade];
}
/** @var Validator $validator */
$validator = $t... | php | public function getCascadeOption($cascadeValue)
{
$defaultCascade = $this->getRegistry()->config->get(static::CFG_DEFAULT_CASCADE);
if (empty($cascadeValue) && !empty($defaultCascade)) {
return [$defaultCascade];
}
/** @var Validator $validator */
$validator = $t... | [
"public",
"function",
"getCascadeOption",
"(",
"$",
"cascadeValue",
")",
"{",
"$",
"defaultCascade",
"=",
"$",
"this",
"->",
"getRegistry",
"(",
")",
"->",
"config",
"->",
"get",
"(",
"static",
"::",
"CFG_DEFAULT_CASCADE",
")",
";",
"if",
"(",
"empty",
"("... | get the cascade option as array. Only returns values allowed by Doctrine.
@param $cascadeValue string cascade options separated by comma
@return array array with the values or null, if no cascade values are available | [
"get",
"the",
"cascade",
"option",
"as",
"array",
".",
"Only",
"returns",
"values",
"allowed",
"by",
"Doctrine",
"."
] | a62b13cbf4824c05cc791034ffedf419242ba0cb | https://github.com/mysql-workbench-schema-exporter/doctrine2-exporter/blob/a62b13cbf4824c05cc791034ffedf419242ba0cb/lib/MwbExporter/Formatter/Doctrine2/Formatter.php#L137-L155 |
221,315 | mysql-workbench-schema-exporter/doctrine2-exporter | lib/MwbExporter/Formatter/Doctrine2/Formatter.php | Formatter.getOrderOption | public function getOrderOption($sortValue)
{
$orders = array();
if ($sortValue = trim($sortValue)) {
$lines = array_map('trim', explode("\n", $sortValue));
foreach ($lines as $line) {
if (count($values = array_map('trim', explode(',', $line)))) {
... | php | public function getOrderOption($sortValue)
{
$orders = array();
if ($sortValue = trim($sortValue)) {
$lines = array_map('trim', explode("\n", $sortValue));
foreach ($lines as $line) {
if (count($values = array_map('trim', explode(',', $line)))) {
... | [
"public",
"function",
"getOrderOption",
"(",
"$",
"sortValue",
")",
"{",
"$",
"orders",
"=",
"array",
"(",
")",
";",
"if",
"(",
"$",
"sortValue",
"=",
"trim",
"(",
"$",
"sortValue",
")",
")",
"{",
"$",
"lines",
"=",
"array_map",
"(",
"'trim'",
",",
... | Parse order option.
@param string $sortValue
@return array | [
"Parse",
"order",
"option",
"."
] | a62b13cbf4824c05cc791034ffedf419242ba0cb | https://github.com/mysql-workbench-schema-exporter/doctrine2-exporter/blob/a62b13cbf4824c05cc791034ffedf419242ba0cb/lib/MwbExporter/Formatter/Doctrine2/Formatter.php#L179-L197 |
221,316 | oleh-ozimok/php-centrifugo | src/Centrifugo/BatchResponse.php | BatchResponse.addResponse | public function addResponse($key, array $response)
{
$originalRequest = isset($this->request[$key]) ? $this->request[$key] : null;
$responseBody = isset($response['body']) ? $response['body'] : null;
$responseError = isset($response['error']) ? $response['error'] : null;
$responseMet... | php | public function addResponse($key, array $response)
{
$originalRequest = isset($this->request[$key]) ? $this->request[$key] : null;
$responseBody = isset($response['body']) ? $response['body'] : null;
$responseError = isset($response['error']) ? $response['error'] : null;
$responseMet... | [
"public",
"function",
"addResponse",
"(",
"$",
"key",
",",
"array",
"$",
"response",
")",
"{",
"$",
"originalRequest",
"=",
"isset",
"(",
"$",
"this",
"->",
"request",
"[",
"$",
"key",
"]",
")",
"?",
"$",
"this",
"->",
"request",
"[",
"$",
"key",
"... | Add a response to the list.
@param int $key
@param array|null $response | [
"Add",
"a",
"response",
"to",
"the",
"list",
"."
] | f90490407474b7f0274f339728f9b0b0e264e09d | https://github.com/oleh-ozimok/php-centrifugo/blob/f90490407474b7f0274f339728f9b0b0e264e09d/src/Centrifugo/BatchResponse.php#L50-L58 |
221,317 | webcreate/vcs | src/Webcreate/Vcs/Svn/Svnadmin.php | Svnadmin.destroy | public function destroy($name)
{
$path = $this->getReposDir($name);
if (!is_dir($path)) {
throw new \InvalidArgumentException(sprintf('Repository path %s does not exists', $path));
}
$filesystem = new Filesystem();
$filesystem->remove($path);
} | php | public function destroy($name)
{
$path = $this->getReposDir($name);
if (!is_dir($path)) {
throw new \InvalidArgumentException(sprintf('Repository path %s does not exists', $path));
}
$filesystem = new Filesystem();
$filesystem->remove($path);
} | [
"public",
"function",
"destroy",
"(",
"$",
"name",
")",
"{",
"$",
"path",
"=",
"$",
"this",
"->",
"getReposDir",
"(",
"$",
"name",
")",
";",
"if",
"(",
"!",
"is_dir",
"(",
"$",
"path",
")",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgumentException",
... | Destroys a specific repository
@param string $name
@throws \InvalidArgumentException | [
"Destroys",
"a",
"specific",
"repository"
] | 31a680f2501c4e5a599e8dd3ffbc8c0a5185c8ad | https://github.com/webcreate/vcs/blob/31a680f2501c4e5a599e8dd3ffbc8c0a5185c8ad/src/Webcreate/Vcs/Svn/Svnadmin.php#L75-L85 |
221,318 | webcreate/vcs | src/Webcreate/Vcs/Svn/Svnadmin.php | Svnadmin.svnconf | public function svnconf($name, $svnserveFile)
{
$filesystem = new Filesystem();
$filesystem->rename($this->getReposDir($name) . '/conf/svnserve.conf', $this->getReposDir($name) . '/conf/svnserve.conf~');
$filesystem->symlink($svnserveFile, $this->getReposDir($name) . '/conf/svnserve.conf');
... | php | public function svnconf($name, $svnserveFile)
{
$filesystem = new Filesystem();
$filesystem->rename($this->getReposDir($name) . '/conf/svnserve.conf', $this->getReposDir($name) . '/conf/svnserve.conf~');
$filesystem->symlink($svnserveFile, $this->getReposDir($name) . '/conf/svnserve.conf');
... | [
"public",
"function",
"svnconf",
"(",
"$",
"name",
",",
"$",
"svnserveFile",
")",
"{",
"$",
"filesystem",
"=",
"new",
"Filesystem",
"(",
")",
";",
"$",
"filesystem",
"->",
"rename",
"(",
"$",
"this",
"->",
"getReposDir",
"(",
"$",
"name",
")",
".",
"... | Creates a backup of svnserve.conf and links
a global svnserve.conf in the repository
@param string $name name of the repository
@param string $svnserveFile full path to the global svnserve.conf
@throws ProcessFailedException
@throws \RuntimeException | [
"Creates",
"a",
"backup",
"of",
"svnserve",
".",
"conf",
"and",
"links",
"a",
"global",
"svnserve",
".",
"conf",
"in",
"the",
"repository"
] | 31a680f2501c4e5a599e8dd3ffbc8c0a5185c8ad | https://github.com/webcreate/vcs/blob/31a680f2501c4e5a599e8dd3ffbc8c0a5185c8ad/src/Webcreate/Vcs/Svn/Svnadmin.php#L96-L101 |
221,319 | webcreate/vcs | src/Webcreate/Vcs/Svn/Svnadmin.php | Svnadmin.exec | protected function exec($command, array $arguments = array())
{
$command = $this->bin . ' ' . $command;
$commandline = $this->cli->prepare($command, $arguments);
if ($this->cli->execute($commandline) <> 0) {
throw new ProcessFailedException($this->cli->getProcess());
} ... | php | protected function exec($command, array $arguments = array())
{
$command = $this->bin . ' ' . $command;
$commandline = $this->cli->prepare($command, $arguments);
if ($this->cli->execute($commandline) <> 0) {
throw new ProcessFailedException($this->cli->getProcess());
} ... | [
"protected",
"function",
"exec",
"(",
"$",
"command",
",",
"array",
"$",
"arguments",
"=",
"array",
"(",
")",
")",
"{",
"$",
"command",
"=",
"$",
"this",
"->",
"bin",
".",
"' '",
".",
"$",
"command",
";",
"$",
"commandline",
"=",
"$",
"this",
"->",... | Executes a svnadmin command
@param string $command
@param array $arguments
@throws ProcessFailedException
@throws \RuntimeException
@return string | [
"Executes",
"a",
"svnadmin",
"command"
] | 31a680f2501c4e5a599e8dd3ffbc8c0a5185c8ad | https://github.com/webcreate/vcs/blob/31a680f2501c4e5a599e8dd3ffbc8c0a5185c8ad/src/Webcreate/Vcs/Svn/Svnadmin.php#L123-L136 |
221,320 | Fritak/messenger-platform | MessengerPlatform.php | MessengerPlatform.sendMessage | public function sendMessage($recipient, $textMessage, $notificationType = MessageSend::NOTIFICATION_TYPE_REGULAR)
{
$message = new MessageSend($recipient, $textMessage, $notificationType);
return $this->gate->request(Gate::URL_MESSAGES, $message->getDataForCall());
} | php | public function sendMessage($recipient, $textMessage, $notificationType = MessageSend::NOTIFICATION_TYPE_REGULAR)
{
$message = new MessageSend($recipient, $textMessage, $notificationType);
return $this->gate->request(Gate::URL_MESSAGES, $message->getDataForCall());
} | [
"public",
"function",
"sendMessage",
"(",
"$",
"recipient",
",",
"$",
"textMessage",
",",
"$",
"notificationType",
"=",
"MessageSend",
"::",
"NOTIFICATION_TYPE_REGULAR",
")",
"{",
"$",
"message",
"=",
"new",
"MessageSend",
"(",
"$",
"recipient",
",",
"$",
"tex... | Send a simple text message.
@param int $recipient This must be either:
<ul>
<li>an id that was retrieved through the Messenger entry points or through the Messenger callbacks</li>
<li>or instance of fritak\MessengerPlatform\UserRecipient</li>
</ul>
@param string $textMessage Text.
@param string $notificationType One o... | [
"Send",
"a",
"simple",
"text",
"message",
"."
] | 689c56636036101240598d55322df974da069a22 | https://github.com/Fritak/messenger-platform/blob/689c56636036101240598d55322df974da069a22/MessengerPlatform.php#L71-L76 |
221,321 | Fritak/messenger-platform | MessengerPlatform.php | MessengerPlatform.sendButton | public function sendButton($recipient, $text, $buttons, $notificationType = MessageSend::NOTIFICATION_TYPE_REGULAR)
{
$structuredMessage = new StructuredMessage($recipient,
['text' => $text, 'buttons' => $buttons],
... | php | public function sendButton($recipient, $text, $buttons, $notificationType = MessageSend::NOTIFICATION_TYPE_REGULAR)
{
$structuredMessage = new StructuredMessage($recipient,
['text' => $text, 'buttons' => $buttons],
... | [
"public",
"function",
"sendButton",
"(",
"$",
"recipient",
",",
"$",
"text",
",",
"$",
"buttons",
",",
"$",
"notificationType",
"=",
"MessageSend",
"::",
"NOTIFICATION_TYPE_REGULAR",
")",
"{",
"$",
"structuredMessage",
"=",
"new",
"StructuredMessage",
"(",
"$",
... | Send a structured Message - button template.
@param int $recipient This must be either:
<ul>
<li>an id that was retrieved through the Messenger entry points or through the Messenger callbacks</li>
<li>or instance of fritak\MessengerPlatform\UserRecipient</li>
</ul>
@param string $text Text.
@param array $buttons Array... | [
"Send",
"a",
"structured",
"Message",
"-",
"button",
"template",
"."
] | 689c56636036101240598d55322df974da069a22 | https://github.com/Fritak/messenger-platform/blob/689c56636036101240598d55322df974da069a22/MessengerPlatform.php#L118-L127 |
221,322 | Fritak/messenger-platform | MessengerPlatform.php | MessengerPlatform.sendReceipt | public function sendReceipt($recipient, Receipt $receipt, $notificationType = MessageSend::NOTIFICATION_TYPE_REGULAR)
{
$structuredMessage = new StructuredMessage($recipient,
$receipt,
$notificationType, ... | php | public function sendReceipt($recipient, Receipt $receipt, $notificationType = MessageSend::NOTIFICATION_TYPE_REGULAR)
{
$structuredMessage = new StructuredMessage($recipient,
$receipt,
$notificationType, ... | [
"public",
"function",
"sendReceipt",
"(",
"$",
"recipient",
",",
"Receipt",
"$",
"receipt",
",",
"$",
"notificationType",
"=",
"MessageSend",
"::",
"NOTIFICATION_TYPE_REGULAR",
")",
"{",
"$",
"structuredMessage",
"=",
"new",
"StructuredMessage",
"(",
"$",
"recipie... | Send a structured Message - receipt template.
@param int $recipient This must be either:
<ul>
<li>an id that was retrieved through the Messenger entry points or through the Messenger callbacks</li>
<li>or instance of fritak\MessengerPlatform\UserRecipient</li>
</ul>
@param Receipt $receipt
@param string $notificationT... | [
"Send",
"a",
"structured",
"Message",
"-",
"receipt",
"template",
"."
] | 689c56636036101240598d55322df974da069a22 | https://github.com/Fritak/messenger-platform/blob/689c56636036101240598d55322df974da069a22/MessengerPlatform.php#L142-L151 |
221,323 | mysql-workbench-schema-exporter/doctrine2-exporter | lib/MwbExporter/Formatter/Doctrine2/Model/Column.php | Column.isNullableRequired | public function isNullableRequired($defaultValue = self::NULLABLE_DEFAULT)
{
$isNullable = !$this->isNotNull();
return $isNullable === $defaultValue ? ($this->isAlwaysNullable() ? true : false) : true;
} | php | public function isNullableRequired($defaultValue = self::NULLABLE_DEFAULT)
{
$isNullable = !$this->isNotNull();
return $isNullable === $defaultValue ? ($this->isAlwaysNullable() ? true : false) : true;
} | [
"public",
"function",
"isNullableRequired",
"(",
"$",
"defaultValue",
"=",
"self",
"::",
"NULLABLE_DEFAULT",
")",
"{",
"$",
"isNullable",
"=",
"!",
"$",
"this",
"->",
"isNotNull",
"(",
")",
";",
"return",
"$",
"isNullable",
"===",
"$",
"defaultValue",
"?",
... | Is nullable attribute required.
@return boolean | [
"Is",
"nullable",
"attribute",
"required",
"."
] | a62b13cbf4824c05cc791034ffedf419242ba0cb | https://github.com/mysql-workbench-schema-exporter/doctrine2-exporter/blob/a62b13cbf4824c05cc791034ffedf419242ba0cb/lib/MwbExporter/Formatter/Doctrine2/Model/Column.php#L60-L65 |
221,324 | mysql-workbench-schema-exporter/doctrine2-exporter | lib/MwbExporter/Formatter/Doctrine2/Model/Column.php | Column.getNullableValue | public function getNullableValue($defaultValue = self::NULLABLE_DEFAULT)
{
$isNullable = !$this->isNotNull();
return $isNullable === $defaultValue ? ($this->isAlwaysNullable() ? $isNullable : null) : $isNullable;
} | php | public function getNullableValue($defaultValue = self::NULLABLE_DEFAULT)
{
$isNullable = !$this->isNotNull();
return $isNullable === $defaultValue ? ($this->isAlwaysNullable() ? $isNullable : null) : $isNullable;
} | [
"public",
"function",
"getNullableValue",
"(",
"$",
"defaultValue",
"=",
"self",
"::",
"NULLABLE_DEFAULT",
")",
"{",
"$",
"isNullable",
"=",
"!",
"$",
"this",
"->",
"isNotNull",
"(",
")",
";",
"return",
"$",
"isNullable",
"===",
"$",
"defaultValue",
"?",
"... | Get nullable attribute value.
@return boolean | [
"Get",
"nullable",
"attribute",
"value",
"."
] | a62b13cbf4824c05cc791034ffedf419242ba0cb | https://github.com/mysql-workbench-schema-exporter/doctrine2-exporter/blob/a62b13cbf4824c05cc791034ffedf419242ba0cb/lib/MwbExporter/Formatter/Doctrine2/Model/Column.php#L72-L77 |
221,325 | mysql-workbench-schema-exporter/doctrine2-exporter | lib/MwbExporter/Formatter/Doctrine2/Model/Column.php | Column.isIgnored | public function isIgnored()
{
// don't ignore primary key
if ($this->isPrimary) {
return false;
}
// don't ignore when configuration is not set
if (!$this->getConfig()->get(Formatter::CFG_SKIP_COLUMN_WITH_RELATION)) {
return false;
}
//... | php | public function isIgnored()
{
// don't ignore primary key
if ($this->isPrimary) {
return false;
}
// don't ignore when configuration is not set
if (!$this->getConfig()->get(Formatter::CFG_SKIP_COLUMN_WITH_RELATION)) {
return false;
}
//... | [
"public",
"function",
"isIgnored",
"(",
")",
"{",
"// don't ignore primary key",
"if",
"(",
"$",
"this",
"->",
"isPrimary",
")",
"{",
"return",
"false",
";",
"}",
"// don't ignore when configuration is not set",
"if",
"(",
"!",
"$",
"this",
"->",
"getConfig",
"(... | Check if column is ignored.
@return boolean | [
"Check",
"if",
"column",
"is",
"ignored",
"."
] | a62b13cbf4824c05cc791034ffedf419242ba0cb | https://github.com/mysql-workbench-schema-exporter/doctrine2-exporter/blob/a62b13cbf4824c05cc791034ffedf419242ba0cb/lib/MwbExporter/Formatter/Doctrine2/Model/Column.php#L84-L100 |
221,326 | mysql-workbench-schema-exporter/doctrine2-exporter | lib/MwbExporter/Formatter/Doctrine2/Model/Column.php | Column.isBoolean | public function isBoolean()
{
$columnType = $this->getColumnType();
if (
DatatypeConverterInterface::USERDATATYPE_BOOL == $columnType ||
DatatypeConverterInterface::USERDATATYPE_BOOLEAN == $columnType ||
(
DatatypeConverterInterface::DATATYPE_TINY... | php | public function isBoolean()
{
$columnType = $this->getColumnType();
if (
DatatypeConverterInterface::USERDATATYPE_BOOL == $columnType ||
DatatypeConverterInterface::USERDATATYPE_BOOLEAN == $columnType ||
(
DatatypeConverterInterface::DATATYPE_TINY... | [
"public",
"function",
"isBoolean",
"(",
")",
"{",
"$",
"columnType",
"=",
"$",
"this",
"->",
"getColumnType",
"(",
")",
";",
"if",
"(",
"DatatypeConverterInterface",
"::",
"USERDATATYPE_BOOL",
"==",
"$",
"columnType",
"||",
"DatatypeConverterInterface",
"::",
"U... | Check If column is boolean.
@return boolean | [
"Check",
"If",
"column",
"is",
"boolean",
"."
] | a62b13cbf4824c05cc791034ffedf419242ba0cb | https://github.com/mysql-workbench-schema-exporter/doctrine2-exporter/blob/a62b13cbf4824c05cc791034ffedf419242ba0cb/lib/MwbExporter/Formatter/Doctrine2/Model/Column.php#L107-L123 |
221,327 | webcreate/vcs | src/Webcreate/Vcs/Git/AbstractGit.php | AbstractGit.setCwd | public function setCwd($cwd)
{
$this->hasCheckout = false;
$this->hasClone = false;
$this->isTemporary = false;
if (is_null($cwd)) {
$this->cwd = sys_get_temp_dir() . '/' . uniqid('git');
// ensure the working directory exists (needed on windows)
... | php | public function setCwd($cwd)
{
$this->hasCheckout = false;
$this->hasClone = false;
$this->isTemporary = false;
if (is_null($cwd)) {
$this->cwd = sys_get_temp_dir() . '/' . uniqid('git');
// ensure the working directory exists (needed on windows)
... | [
"public",
"function",
"setCwd",
"(",
"$",
"cwd",
")",
"{",
"$",
"this",
"->",
"hasCheckout",
"=",
"false",
";",
"$",
"this",
"->",
"hasClone",
"=",
"false",
";",
"$",
"this",
"->",
"isTemporary",
"=",
"false",
";",
"if",
"(",
"is_null",
"(",
"$",
"... | Sets the current working directory
@param string $cwd
@return \Webcreate\Vcs\Git\AbstractGit | [
"Sets",
"the",
"current",
"working",
"directory"
] | 31a680f2501c4e5a599e8dd3ffbc8c0a5185c8ad | https://github.com/webcreate/vcs/blob/31a680f2501c4e5a599e8dd3ffbc8c0a5185c8ad/src/Webcreate/Vcs/Git/AbstractGit.php#L81-L106 |
221,328 | webcreate/vcs | src/Webcreate/Vcs/Git/AbstractGit.php | AbstractGit.execute | protected function execute($command, array $arguments = array(), $cwd = null)
{
if (null === $cwd) {
$cwd = $this->cwd;
}
return $this->adapter->execute($command, $arguments, $cwd);
} | php | protected function execute($command, array $arguments = array(), $cwd = null)
{
if (null === $cwd) {
$cwd = $this->cwd;
}
return $this->adapter->execute($command, $arguments, $cwd);
} | [
"protected",
"function",
"execute",
"(",
"$",
"command",
",",
"array",
"$",
"arguments",
"=",
"array",
"(",
")",
",",
"$",
"cwd",
"=",
"null",
")",
"{",
"if",
"(",
"null",
"===",
"$",
"cwd",
")",
"{",
"$",
"cwd",
"=",
"$",
"this",
"->",
"cwd",
... | Execute GIT command
@param string $command
@param array $arguments
@param string|null $cwd
@return string | [
"Execute",
"GIT",
"command"
] | 31a680f2501c4e5a599e8dd3ffbc8c0a5185c8ad | https://github.com/webcreate/vcs/blob/31a680f2501c4e5a599e8dd3ffbc8c0a5185c8ad/src/Webcreate/Vcs/Git/AbstractGit.php#L125-L132 |
221,329 | rubellum/Slim-Blade-View | src/Blade.php | Blade.get | public function get($key)
{
if (!isset($this->attributes[$key])) {
return false;
}
return $this->attributes[$key];
} | php | public function get($key)
{
if (!isset($this->attributes[$key])) {
return false;
}
return $this->attributes[$key];
} | [
"public",
"function",
"get",
"(",
"$",
"key",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"attributes",
"[",
"$",
"key",
"]",
")",
")",
"{",
"return",
"false",
";",
"}",
"return",
"$",
"this",
"->",
"attributes",
"[",
"$",
"key",
... | Retrieve an attribute
@param $key
@return mixed | [
"Retrieve",
"an",
"attribute"
] | 956f791a0d0c9d99dbb10de043989b11f452a7e6 | https://github.com/rubellum/Slim-Blade-View/blob/956f791a0d0c9d99dbb10de043989b11f452a7e6/src/Blade.php#L108-L115 |
221,330 | rubellum/Slim-Blade-View | src/Blade.php | Blade.fetch | public function fetch($template, array $data = [])
{
if (isset($data['template'])) {
throw new \InvalidArgumentException("Duplicate template key found");
}
$data = array_merge($this->attributes, $data);
$renderer = new \Philo\Blade\Blade($this->viewPaths, $this->cachePa... | php | public function fetch($template, array $data = [])
{
if (isset($data['template'])) {
throw new \InvalidArgumentException("Duplicate template key found");
}
$data = array_merge($this->attributes, $data);
$renderer = new \Philo\Blade\Blade($this->viewPaths, $this->cachePa... | [
"public",
"function",
"fetch",
"(",
"$",
"template",
",",
"array",
"$",
"data",
"=",
"[",
"]",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"data",
"[",
"'template'",
"]",
")",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgumentException",
"(",
"\"Duplicate te... | Renders a template and returns the result as a string
cannot contain template as a key
throws RuntimeException if $templatePath . $template does not exist
@param $template
@param array $data
@return mixed
@throws \InvalidArgumentException
@throws \RuntimeException | [
"Renders",
"a",
"template",
"and",
"returns",
"the",
"result",
"as",
"a",
"string"
] | 956f791a0d0c9d99dbb10de043989b11f452a7e6 | https://github.com/rubellum/Slim-Blade-View/blob/956f791a0d0c9d99dbb10de043989b11f452a7e6/src/Blade.php#L164-L174 |
221,331 | mdmsoft/yii2-ar-behaviors | ExtendedBehavior.php | ExtendedBehavior.afterSave | public function afterSave($event)
{
foreach ($this->relationKey as $from => $to) {
$this->_relation[$to] = $this->owner[$from];
}
$this->_relation->save();
} | php | public function afterSave($event)
{
foreach ($this->relationKey as $from => $to) {
$this->_relation[$to] = $this->owner[$from];
}
$this->_relation->save();
} | [
"public",
"function",
"afterSave",
"(",
"$",
"event",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"relationKey",
"as",
"$",
"from",
"=>",
"$",
"to",
")",
"{",
"$",
"this",
"->",
"_relation",
"[",
"$",
"to",
"]",
"=",
"$",
"this",
"->",
"owner",
... | Execute after model saved
@param \yii\base\Event $event | [
"Execute",
"after",
"model",
"saved"
] | 16985ebe3fdf9cd67b0c58900adccbe816c16dc3 | https://github.com/mdmsoft/yii2-ar-behaviors/blob/16985ebe3fdf9cd67b0c58900adccbe816c16dc3/ExtendedBehavior.php#L148-L154 |
221,332 | webcreate/vcs | src/Webcreate/Vcs/Common/AbstractClient.php | AbstractClient.setAdapter | public function setAdapter(AdapterInterface $adapter)
{
$adapter->setClient($this);
$this->adapter = $adapter;
return $this;
} | php | public function setAdapter(AdapterInterface $adapter)
{
$adapter->setClient($this);
$this->adapter = $adapter;
return $this;
} | [
"public",
"function",
"setAdapter",
"(",
"AdapterInterface",
"$",
"adapter",
")",
"{",
"$",
"adapter",
"->",
"setClient",
"(",
"$",
"this",
")",
";",
"$",
"this",
"->",
"adapter",
"=",
"$",
"adapter",
";",
"return",
"$",
"this",
";",
"}"
] | Sets the adapter
@param AdapterInterface $adapter
@return \Webcreate\Vcs\Common\AbstractClient | [
"Sets",
"the",
"adapter"
] | 31a680f2501c4e5a599e8dd3ffbc8c0a5185c8ad | https://github.com/webcreate/vcs/blob/31a680f2501c4e5a599e8dd3ffbc8c0a5185c8ad/src/Webcreate/Vcs/Common/AbstractClient.php#L65-L72 |
221,333 | webcreate/vcs | src/Webcreate/Vcs/Common/AbstractClient.php | AbstractClient.dispatch | public function dispatch($eventName, $data = null)
{
if (!interface_exists('Symfony\Component\EventDispatcher\EventDispatcherInterface')) {
return;
}
if (null === $this->dispatcher) {
return;
}
$event = new VcsEvent($data);
$this->dispatcher... | php | public function dispatch($eventName, $data = null)
{
if (!interface_exists('Symfony\Component\EventDispatcher\EventDispatcherInterface')) {
return;
}
if (null === $this->dispatcher) {
return;
}
$event = new VcsEvent($data);
$this->dispatcher... | [
"public",
"function",
"dispatch",
"(",
"$",
"eventName",
",",
"$",
"data",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"interface_exists",
"(",
"'Symfony\\Component\\EventDispatcher\\EventDispatcherInterface'",
")",
")",
"{",
"return",
";",
"}",
"if",
"(",
"null",
... | Dispatches an event if the event dispatcher is available
@param string $eventName
@param mixed $data | [
"Dispatches",
"an",
"event",
"if",
"the",
"event",
"dispatcher",
"is",
"available"
] | 31a680f2501c4e5a599e8dd3ffbc8c0a5185c8ad | https://github.com/webcreate/vcs/blob/31a680f2501c4e5a599e8dd3ffbc8c0a5185c8ad/src/Webcreate/Vcs/Common/AbstractClient.php#L157-L170 |
221,334 | ekapusta/oauth2-esia | src/Security/Signer/OpensslCli.php | OpensslCli.run | private function run($command, $input)
{
$process = proc_open($command, [
['pipe', 'r'], // stdin
['pipe', 'w'], // stdout
['pipe', 'w'], // stderr
], $pipes);
fwrite($pipes[0], $input);
fclose($pipes[0]);
$result = stream_get_contents($p... | php | private function run($command, $input)
{
$process = proc_open($command, [
['pipe', 'r'], // stdin
['pipe', 'w'], // stdout
['pipe', 'w'], // stderr
], $pipes);
fwrite($pipes[0], $input);
fclose($pipes[0]);
$result = stream_get_contents($p... | [
"private",
"function",
"run",
"(",
"$",
"command",
",",
"$",
"input",
")",
"{",
"$",
"process",
"=",
"proc_open",
"(",
"$",
"command",
",",
"[",
"[",
"'pipe'",
",",
"'r'",
"]",
",",
"// stdin",
"[",
"'pipe'",
",",
"'w'",
"]",
",",
"// stdout",
"[",... | Runs command with input from STDIN. | [
"Runs",
"command",
"with",
"input",
"from",
"STDIN",
"."
] | 621bc6138e7045b71d4eaeed465421f977a89d0c | https://github.com/ekapusta/oauth2-esia/blob/621bc6138e7045b71d4eaeed465421f977a89d0c/src/Security/Signer/OpensslCli.php#L42-L67 |
221,335 | Fritak/messenger-platform | source/Gate.php | Gate.prepareData | protected function prepareData($data)
{
if(!is_array($data))
{
$data = [];
}
$data['access_token'] = $this->config->accessToken;
return http_build_query($data);
} | php | protected function prepareData($data)
{
if(!is_array($data))
{
$data = [];
}
$data['access_token'] = $this->config->accessToken;
return http_build_query($data);
} | [
"protected",
"function",
"prepareData",
"(",
"$",
"data",
")",
"{",
"if",
"(",
"!",
"is_array",
"(",
"$",
"data",
")",
")",
"{",
"$",
"data",
"=",
"[",
"]",
";",
"}",
"$",
"data",
"[",
"'access_token'",
"]",
"=",
"$",
"this",
"->",
"config",
"->"... | Prepare data for request.
@param array $data
@return string | [
"Prepare",
"data",
"for",
"request",
"."
] | 689c56636036101240598d55322df974da069a22 | https://github.com/Fritak/messenger-platform/blob/689c56636036101240598d55322df974da069a22/source/Gate.php#L88-L98 |
221,336 | execut/yii2-robots-txt | Generator.php | Generator.render | public function render()
{
$result = "";
$params = [];
$params['Host'] = $this->host;
$siteMap = $this->sitemap;
if (is_array($siteMap)) {
$siteMap = Url::to($siteMap, true);
}
$params['Sitemap'] = $siteMap;
foreach (array_filter($params) ... | php | public function render()
{
$result = "";
$params = [];
$params['Host'] = $this->host;
$siteMap = $this->sitemap;
if (is_array($siteMap)) {
$siteMap = Url::to($siteMap, true);
}
$params['Sitemap'] = $siteMap;
foreach (array_filter($params) ... | [
"public",
"function",
"render",
"(",
")",
"{",
"$",
"result",
"=",
"\"\"",
";",
"$",
"params",
"=",
"[",
"]",
";",
"$",
"params",
"[",
"'Host'",
"]",
"=",
"$",
"this",
"->",
"host",
";",
"$",
"siteMap",
"=",
"$",
"this",
"->",
"sitemap",
";",
"... | render robots.txt
@return string | [
"render",
"robots",
".",
"txt"
] | efcda9e8cf8fef75a94738eb4f07f3ac21ad4619 | https://github.com/execut/yii2-robots-txt/blob/efcda9e8cf8fef75a94738eb4f07f3ac21ad4619/Generator.php#L43-L81 |
221,337 | headzoo/bitcoin-wallet-api | src/Headzoo/Bitcoin/Wallet/Api/Wallet.php | Wallet.setGenerate | public function setGenerate($generate, $gen_proc_limit = -1)
{
$args = [
(bool)$generate,
(int)$gen_proc_limit
];
return null === $this->rpc->query(__FUNCTION__, $args);
} | php | public function setGenerate($generate, $gen_proc_limit = -1)
{
$args = [
(bool)$generate,
(int)$gen_proc_limit
];
return null === $this->rpc->query(__FUNCTION__, $args);
} | [
"public",
"function",
"setGenerate",
"(",
"$",
"generate",
",",
"$",
"gen_proc_limit",
"=",
"-",
"1",
")",
"{",
"$",
"args",
"=",
"[",
"(",
"bool",
")",
"$",
"generate",
",",
"(",
"int",
")",
"$",
"gen_proc_limit",
"]",
";",
"return",
"null",
"===",
... | Sets whether the wallet should generate coins
Generation is limited to $gen_proc_limit processors, -1 is unlimited.
@param bool $generate Turn coin generation on (true) or off (false)
@param int $gen_proc_limit The processor limit, or -1 for unlimited
@return bool | [
"Sets",
"whether",
"the",
"wallet",
"should",
"generate",
"coins"
] | f9bbec54be581356f36b5084b50037845a6d00c3 | https://github.com/headzoo/bitcoin-wallet-api/blob/f9bbec54be581356f36b5084b50037845a6d00c3/src/Headzoo/Bitcoin/Wallet/Api/Wallet.php#L256-L263 |
221,338 | headzoo/bitcoin-wallet-api | src/Headzoo/Bitcoin/Wallet/Api/Wallet.php | Wallet.addNode | public function addNode($node, $type)
{
$args = [
(string)$node,
(string)$type
];
return null === $this->rpc->query(__FUNCTION__, $args);
} | php | public function addNode($node, $type)
{
$args = [
(string)$node,
(string)$type
];
return null === $this->rpc->query(__FUNCTION__, $args);
} | [
"public",
"function",
"addNode",
"(",
"$",
"node",
",",
"$",
"type",
")",
"{",
"$",
"args",
"=",
"[",
"(",
"string",
")",
"$",
"node",
",",
"(",
"string",
")",
"$",
"type",
"]",
";",
"return",
"null",
"===",
"$",
"this",
"->",
"rpc",
"->",
"que... | Attempts add or remove a node from the addnode list or try a connection to it once
@param string $node The node ip address and port in <ip>:<port> format (see getPeerInfo() for nodes)
@param string $type Use "add" to add a node to the list, "remove" to remove a node from the list, "onetry" to try a connection to the... | [
"Attempts",
"add",
"or",
"remove",
"a",
"node",
"from",
"the",
"addnode",
"list",
"or",
"try",
"a",
"connection",
"to",
"it",
"once"
] | f9bbec54be581356f36b5084b50037845a6d00c3 | https://github.com/headzoo/bitcoin-wallet-api/blob/f9bbec54be581356f36b5084b50037845a6d00c3/src/Headzoo/Bitcoin/Wallet/Api/Wallet.php#L272-L279 |
221,339 | headzoo/bitcoin-wallet-api | src/Headzoo/Bitcoin/Wallet/Api/Wallet.php | Wallet.getNodeInfo | public function getNodeInfo($dns, $node = null)
{
// Can't pass null as the second arg. The arg must not exist.
$args = [
(bool)$dns
];
if (null !== $node) {
$args[] = (string)$node;
}
return $this->rpc->query("getAddedNodeInfo", $args);
} | php | public function getNodeInfo($dns, $node = null)
{
// Can't pass null as the second arg. The arg must not exist.
$args = [
(bool)$dns
];
if (null !== $node) {
$args[] = (string)$node;
}
return $this->rpc->query("getAddedNodeInfo", $args);
} | [
"public",
"function",
"getNodeInfo",
"(",
"$",
"dns",
",",
"$",
"node",
"=",
"null",
")",
"{",
"// Can't pass null as the second arg. The arg must not exist.",
"$",
"args",
"=",
"[",
"(",
"bool",
")",
"$",
"dns",
"]",
";",
"if",
"(",
"null",
"!==",
"$",
"n... | Returns information about the given added node, or all added nodes
If dns is false, only a list of added nodes will be provided, otherwise connected information will also
be available.
**Note:** Nodes added using the addnode configuration and "onetry" nodes are not returned.
When $dns is false, returns multidimensio... | [
"Returns",
"information",
"about",
"the",
"given",
"added",
"node",
"or",
"all",
"added",
"nodes"
] | f9bbec54be581356f36b5084b50037845a6d00c3 | https://github.com/headzoo/bitcoin-wallet-api/blob/f9bbec54be581356f36b5084b50037845a6d00c3/src/Headzoo/Bitcoin/Wallet/Api/Wallet.php#L307-L317 |
221,340 | headzoo/bitcoin-wallet-api | src/Headzoo/Bitcoin/Wallet/Api/Wallet.php | Wallet.signMessage | public function signMessage($address, $message)
{
$args = [
(string)$address,
(string)$message
];
return $this->rpc->query(__FUNCTION__, $args);
} | php | public function signMessage($address, $message)
{
$args = [
(string)$address,
(string)$message
];
return $this->rpc->query(__FUNCTION__, $args);
} | [
"public",
"function",
"signMessage",
"(",
"$",
"address",
",",
"$",
"message",
")",
"{",
"$",
"args",
"=",
"[",
"(",
"string",
")",
"$",
"address",
",",
"(",
"string",
")",
"$",
"message",
"]",
";",
"return",
"$",
"this",
"->",
"rpc",
"->",
"query"... | Sign a message with the private key of an address
@param string $address The coin address
@param string $message The message to sign
@return string | [
"Sign",
"a",
"message",
"with",
"the",
"private",
"key",
"of",
"an",
"address"
] | f9bbec54be581356f36b5084b50037845a6d00c3 | https://github.com/headzoo/bitcoin-wallet-api/blob/f9bbec54be581356f36b5084b50037845a6d00c3/src/Headzoo/Bitcoin/Wallet/Api/Wallet.php#L326-L333 |
221,341 | headzoo/bitcoin-wallet-api | src/Headzoo/Bitcoin/Wallet/Api/Wallet.php | Wallet.signRawTransaction | public function signRawTransaction($hex_data, array $prevtxs = [], array $priv_keys = [], $sighashtype = "ALL")
{
$args = [
(string)$hex_data,
!empty($prevtxs) ? $prevtxs : null,
!empty($priv_keys) ? $priv_keys : null,
(string)$sighashtype
];
... | php | public function signRawTransaction($hex_data, array $prevtxs = [], array $priv_keys = [], $sighashtype = "ALL")
{
$args = [
(string)$hex_data,
!empty($prevtxs) ? $prevtxs : null,
!empty($priv_keys) ? $priv_keys : null,
(string)$sighashtype
];
... | [
"public",
"function",
"signRawTransaction",
"(",
"$",
"hex_data",
",",
"array",
"$",
"prevtxs",
"=",
"[",
"]",
",",
"array",
"$",
"priv_keys",
"=",
"[",
"]",
",",
"$",
"sighashtype",
"=",
"\"ALL\"",
")",
"{",
"$",
"args",
"=",
"[",
"(",
"string",
")"... | Adds signatures to a raw transaction and returns the resulting raw transaction
If provided, the $prev_txs argument should be a multidimensional array, with the sub-arrays having the
following keys:
```
"txid" - (string) The transaction id.
"vout" - (int) The output number.
"scriptPubKey" - (str... | [
"Adds",
"signatures",
"to",
"a",
"raw",
"transaction",
"and",
"returns",
"the",
"resulting",
"raw",
"transaction"
] | f9bbec54be581356f36b5084b50037845a6d00c3 | https://github.com/headzoo/bitcoin-wallet-api/blob/f9bbec54be581356f36b5084b50037845a6d00c3/src/Headzoo/Bitcoin/Wallet/Api/Wallet.php#L364-L373 |
221,342 | headzoo/bitcoin-wallet-api | src/Headzoo/Bitcoin/Wallet/Api/Wallet.php | Wallet.isSignedMessageValid | public function isSignedMessageValid($address, $signature, $message)
{
$args = [
(string)$address,
(string)$signature,
(string)$message
];
return $this->rpc->query("verifyMessage", $args);
} | php | public function isSignedMessageValid($address, $signature, $message)
{
$args = [
(string)$address,
(string)$signature,
(string)$message
];
return $this->rpc->query("verifyMessage", $args);
} | [
"public",
"function",
"isSignedMessageValid",
"(",
"$",
"address",
",",
"$",
"signature",
",",
"$",
"message",
")",
"{",
"$",
"args",
"=",
"[",
"(",
"string",
")",
"$",
"address",
",",
"(",
"string",
")",
"$",
"signature",
",",
"(",
"string",
")",
"$... | Verify a signed message
Returns a boolean value indicating whether the message was successfully verified.
@param string $address A coin address
@param string $signature The signature
@param string $message The message
@return bool | [
"Verify",
"a",
"signed",
"message"
] | f9bbec54be581356f36b5084b50037845a6d00c3 | https://github.com/headzoo/bitcoin-wallet-api/blob/f9bbec54be581356f36b5084b50037845a6d00c3/src/Headzoo/Bitcoin/Wallet/Api/Wallet.php#L385-L393 |
221,343 | headzoo/bitcoin-wallet-api | src/Headzoo/Bitcoin/Wallet/Api/Wallet.php | Wallet.getBalances | public function getBalances($include_empty = false)
{
$args = [
$this->minconf,
(bool)$include_empty
];
return $this->rpc->query("listReceivedByAddress", $args);
} | php | public function getBalances($include_empty = false)
{
$args = [
$this->minconf,
(bool)$include_empty
];
return $this->rpc->query("listReceivedByAddress", $args);
} | [
"public",
"function",
"getBalances",
"(",
"$",
"include_empty",
"=",
"false",
")",
"{",
"$",
"args",
"=",
"[",
"$",
"this",
"->",
"minconf",
",",
"(",
"bool",
")",
"$",
"include_empty",
"]",
";",
"return",
"$",
"this",
"->",
"rpc",
"->",
"query",
"("... | Returns balances by for every address
Returns an mutlidimentional array, which each sub-array containing the following keys:
```
"address" - (string) The receiving address.
"account" - (string) The account of the receiving address, using "" to represent the default account.
"amount" - (double) Th... | [
"Returns",
"balances",
"by",
"for",
"every",
"address"
] | f9bbec54be581356f36b5084b50037845a6d00c3 | https://github.com/headzoo/bitcoin-wallet-api/blob/f9bbec54be581356f36b5084b50037845a6d00c3/src/Headzoo/Bitcoin/Wallet/Api/Wallet.php#L426-L433 |
221,344 | headzoo/bitcoin-wallet-api | src/Headzoo/Bitcoin/Wallet/Api/Wallet.php | Wallet.getBalanceByAccount | public function getBalanceByAccount($account)
{
$args = [
(string)$account,
$this->minconf
];
return $this->rpc->query("getBalance", $args);
} | php | public function getBalanceByAccount($account)
{
$args = [
(string)$account,
$this->minconf
];
return $this->rpc->query("getBalance", $args);
} | [
"public",
"function",
"getBalanceByAccount",
"(",
"$",
"account",
")",
"{",
"$",
"args",
"=",
"[",
"(",
"string",
")",
"$",
"account",
",",
"$",
"this",
"->",
"minconf",
"]",
";",
"return",
"$",
"this",
"->",
"rpc",
"->",
"query",
"(",
"\"getBalance\""... | Returns the balance for the given account
@param string $account The account name, using "" for the default account
@return double | [
"Returns",
"the",
"balance",
"for",
"the",
"given",
"account"
] | f9bbec54be581356f36b5084b50037845a6d00c3 | https://github.com/headzoo/bitcoin-wallet-api/blob/f9bbec54be581356f36b5084b50037845a6d00c3/src/Headzoo/Bitcoin/Wallet/Api/Wallet.php#L441-L448 |
221,345 | headzoo/bitcoin-wallet-api | src/Headzoo/Bitcoin/Wallet/Api/Wallet.php | Wallet.getBalanceByAddress | public function getBalanceByAddress($address)
{
$args = [
(string)$address,
$this->minconf
];
return $this->rpc->query("getReceivedByAddress", $args);
} | php | public function getBalanceByAddress($address)
{
$args = [
(string)$address,
$this->minconf
];
return $this->rpc->query("getReceivedByAddress", $args);
} | [
"public",
"function",
"getBalanceByAddress",
"(",
"$",
"address",
")",
"{",
"$",
"args",
"=",
"[",
"(",
"string",
")",
"$",
"address",
",",
"$",
"this",
"->",
"minconf",
"]",
";",
"return",
"$",
"this",
"->",
"rpc",
"->",
"query",
"(",
"\"getReceivedBy... | Returns the balance for a given address
@param string $address The address
@return double | [
"Returns",
"the",
"balance",
"for",
"a",
"given",
"address"
] | f9bbec54be581356f36b5084b50037845a6d00c3 | https://github.com/headzoo/bitcoin-wallet-api/blob/f9bbec54be581356f36b5084b50037845a6d00c3/src/Headzoo/Bitcoin/Wallet/Api/Wallet.php#L456-L463 |
221,346 | headzoo/bitcoin-wallet-api | src/Headzoo/Bitcoin/Wallet/Api/Wallet.php | Wallet.move | public function move($from_account, $to_account, $amount, $comment = "")
{
$args = [
(string)$from_account,
(string)$to_account,
(double)$amount,
$this->minconf,
(string)$comment
];
return $this->rpc->query(__FUNCTION__, $args);
... | php | public function move($from_account, $to_account, $amount, $comment = "")
{
$args = [
(string)$from_account,
(string)$to_account,
(double)$amount,
$this->minconf,
(string)$comment
];
return $this->rpc->query(__FUNCTION__, $args);
... | [
"public",
"function",
"move",
"(",
"$",
"from_account",
",",
"$",
"to_account",
",",
"$",
"amount",
",",
"$",
"comment",
"=",
"\"\"",
")",
"{",
"$",
"args",
"=",
"[",
"(",
"string",
")",
"$",
"from_account",
",",
"(",
"string",
")",
"$",
"to_account"... | Move from one account in your wallet to another
@param string $from_account Name of the from account
@param string $to_account Name of the to account
@param double $amount The amount to transfer
@param string $comment Comment to record with this transaction
@return bool | [
"Move",
"from",
"one",
"account",
"in",
"your",
"wallet",
"to",
"another"
] | f9bbec54be581356f36b5084b50037845a6d00c3 | https://github.com/headzoo/bitcoin-wallet-api/blob/f9bbec54be581356f36b5084b50037845a6d00c3/src/Headzoo/Bitcoin/Wallet/Api/Wallet.php#L474-L484 |
221,347 | headzoo/bitcoin-wallet-api | src/Headzoo/Bitcoin/Wallet/Api/Wallet.php | Wallet.send | public function send($address, $amount, $comment = null, $comment_to = null)
{
$args = [
(string)$address,
(double)$amount,
(string)$comment,
(string)$comment_to
];
return $this->rpc->query("sendToAddress", $args);
} | php | public function send($address, $amount, $comment = null, $comment_to = null)
{
$args = [
(string)$address,
(double)$amount,
(string)$comment,
(string)$comment_to
];
return $this->rpc->query("sendToAddress", $args);
} | [
"public",
"function",
"send",
"(",
"$",
"address",
",",
"$",
"amount",
",",
"$",
"comment",
"=",
"null",
",",
"$",
"comment_to",
"=",
"null",
")",
"{",
"$",
"args",
"=",
"[",
"(",
"string",
")",
"$",
"address",
",",
"(",
"double",
")",
"$",
"amou... | Sends coins to the given address
Returns the transaction id if successful.
@param string $address Address to send to
@param double $amount The amount to send
@param string $comment Comment to record with this transaction
@param string $comment_to Comment sent to the network with the transaction
@return ... | [
"Sends",
"coins",
"to",
"the",
"given",
"address"
] | f9bbec54be581356f36b5084b50037845a6d00c3 | https://github.com/headzoo/bitcoin-wallet-api/blob/f9bbec54be581356f36b5084b50037845a6d00c3/src/Headzoo/Bitcoin/Wallet/Api/Wallet.php#L497-L506 |
221,348 | headzoo/bitcoin-wallet-api | src/Headzoo/Bitcoin/Wallet/Api/Wallet.php | Wallet.sendFromAccount | public function sendFromAccount($account, $address, $amount, $comment = null, $comment_to = null)
{
$args = [
(string)$account,
(string)$address,
(double)$amount,
$this->minconf,
(string)$comment,
(string)$comment_to
];
... | php | public function sendFromAccount($account, $address, $amount, $comment = null, $comment_to = null)
{
$args = [
(string)$account,
(string)$address,
(double)$amount,
$this->minconf,
(string)$comment,
(string)$comment_to
];
... | [
"public",
"function",
"sendFromAccount",
"(",
"$",
"account",
",",
"$",
"address",
",",
"$",
"amount",
",",
"$",
"comment",
"=",
"null",
",",
"$",
"comment_to",
"=",
"null",
")",
"{",
"$",
"args",
"=",
"[",
"(",
"string",
")",
"$",
"account",
",",
... | Sends coins from the given account to the given address
@param string $account Name of the from account
@param string $address Address to send to
@param double $amount The amount to send
@param string $comment Comment to record with this transaction
@param string $comment_to Comment sent to the netwo... | [
"Sends",
"coins",
"from",
"the",
"given",
"account",
"to",
"the",
"given",
"address"
] | f9bbec54be581356f36b5084b50037845a6d00c3 | https://github.com/headzoo/bitcoin-wallet-api/blob/f9bbec54be581356f36b5084b50037845a6d00c3/src/Headzoo/Bitcoin/Wallet/Api/Wallet.php#L518-L529 |
221,349 | headzoo/bitcoin-wallet-api | src/Headzoo/Bitcoin/Wallet/Api/Wallet.php | Wallet.sendManyFromAccount | public function sendManyFromAccount($account, array $addresses, $comment = null)
{
$args = [
(string)$account,
$addresses,
$this->minconf,
(string)$comment
];
return $this->rpc->query("sendMany", $args);
} | php | public function sendManyFromAccount($account, array $addresses, $comment = null)
{
$args = [
(string)$account,
$addresses,
$this->minconf,
(string)$comment
];
return $this->rpc->query("sendMany", $args);
} | [
"public",
"function",
"sendManyFromAccount",
"(",
"$",
"account",
",",
"array",
"$",
"addresses",
",",
"$",
"comment",
"=",
"null",
")",
"{",
"$",
"args",
"=",
"[",
"(",
"string",
")",
"$",
"account",
",",
"$",
"addresses",
",",
"$",
"this",
"->",
"m... | Sends coins to multiple addresses
@param string $account Name of the from account
@param array $addresses ["address1" => "amount1", "address2" => "amount2"]
@param string $comment A comment on this transaction
@return array | [
"Sends",
"coins",
"to",
"multiple",
"addresses"
] | f9bbec54be581356f36b5084b50037845a6d00c3 | https://github.com/headzoo/bitcoin-wallet-api/blob/f9bbec54be581356f36b5084b50037845a6d00c3/src/Headzoo/Bitcoin/Wallet/Api/Wallet.php#L539-L548 |
221,350 | headzoo/bitcoin-wallet-api | src/Headzoo/Bitcoin/Wallet/Api/Wallet.php | Wallet.getAccounts | public function getAccounts()
{
$accounts = [];
$groups = $this->rpc->query("listAccounts", [0]);
foreach($groups as $account => $balance) {
$accounts[] = $account;
}
return $accounts;
} | php | public function getAccounts()
{
$accounts = [];
$groups = $this->rpc->query("listAccounts", [0]);
foreach($groups as $account => $balance) {
$accounts[] = $account;
}
return $accounts;
} | [
"public",
"function",
"getAccounts",
"(",
")",
"{",
"$",
"accounts",
"=",
"[",
"]",
";",
"$",
"groups",
"=",
"$",
"this",
"->",
"rpc",
"->",
"query",
"(",
"\"listAccounts\"",
",",
"[",
"0",
"]",
")",
";",
"foreach",
"(",
"$",
"groups",
"as",
"$",
... | Returns the wallet accounts
Example return value:
```php
[
"",
"Paper1",
"Mining"
]
```
@return array | [
"Returns",
"the",
"wallet",
"accounts"
] | f9bbec54be581356f36b5084b50037845a6d00c3 | https://github.com/headzoo/bitcoin-wallet-api/blob/f9bbec54be581356f36b5084b50037845a6d00c3/src/Headzoo/Bitcoin/Wallet/Api/Wallet.php#L564-L573 |
221,351 | headzoo/bitcoin-wallet-api | src/Headzoo/Bitcoin/Wallet/Api/Wallet.php | Wallet.setAccount | public function setAccount($address, $account)
{
$args = [
(string)$address,
(string)$account
];
return null === $this->rpc->query(__FUNCTION__, $args);
} | php | public function setAccount($address, $account)
{
$args = [
(string)$address,
(string)$account
];
return null === $this->rpc->query(__FUNCTION__, $args);
} | [
"public",
"function",
"setAccount",
"(",
"$",
"address",
",",
"$",
"account",
")",
"{",
"$",
"args",
"=",
"[",
"(",
"string",
")",
"$",
"address",
",",
"(",
"string",
")",
"$",
"account",
"]",
";",
"return",
"null",
"===",
"$",
"this",
"->",
"rpc",... | Sets the account associated with the given address
Assigning address that is already assigned to the same account will create a new address associated with
that account.
@param string $address A coin address from the wallet
@param string $account Name of the account
@return bool | [
"Sets",
"the",
"account",
"associated",
"with",
"the",
"given",
"address"
] | f9bbec54be581356f36b5084b50037845a6d00c3 | https://github.com/headzoo/bitcoin-wallet-api/blob/f9bbec54be581356f36b5084b50037845a6d00c3/src/Headzoo/Bitcoin/Wallet/Api/Wallet.php#L585-L592 |
221,352 | headzoo/bitcoin-wallet-api | src/Headzoo/Bitcoin/Wallet/Api/Wallet.php | Wallet.getAccountByAddress | public function getAccountByAddress($address)
{
$args = [
(string)$address
];
$account = $this->rpc->query("getAccount", $args);
return !empty($account) ? $account : null;
} | php | public function getAccountByAddress($address)
{
$args = [
(string)$address
];
$account = $this->rpc->query("getAccount", $args);
return !empty($account) ? $account : null;
} | [
"public",
"function",
"getAccountByAddress",
"(",
"$",
"address",
")",
"{",
"$",
"args",
"=",
"[",
"(",
"string",
")",
"$",
"address",
"]",
";",
"$",
"account",
"=",
"$",
"this",
"->",
"rpc",
"->",
"query",
"(",
"\"getAccount\"",
",",
"$",
"args",
")... | Returns the account associated with the given address
Returns null when an account does not exist for the given address.
@param string $address The address for account lookup
@return string|null | [
"Returns",
"the",
"account",
"associated",
"with",
"the",
"given",
"address"
] | f9bbec54be581356f36b5084b50037845a6d00c3 | https://github.com/headzoo/bitcoin-wallet-api/blob/f9bbec54be581356f36b5084b50037845a6d00c3/src/Headzoo/Bitcoin/Wallet/Api/Wallet.php#L602-L610 |
221,353 | headzoo/bitcoin-wallet-api | src/Headzoo/Bitcoin/Wallet/Api/Wallet.php | Wallet.getAddresses | public function getAddresses()
{
$addresses = [];
$groups = $this->rpc->query("listAddressGroupings");
foreach($groups as $group) {
foreach($group as $info) {
$addresses[] = $info[0];
}
}
return $addresses;
} | php | public function getAddresses()
{
$addresses = [];
$groups = $this->rpc->query("listAddressGroupings");
foreach($groups as $group) {
foreach($group as $info) {
$addresses[] = $info[0];
}
}
return $addresses;
} | [
"public",
"function",
"getAddresses",
"(",
")",
"{",
"$",
"addresses",
"=",
"[",
"]",
";",
"$",
"groups",
"=",
"$",
"this",
"->",
"rpc",
"->",
"query",
"(",
"\"listAddressGroupings\"",
")",
";",
"foreach",
"(",
"$",
"groups",
"as",
"$",
"group",
")",
... | Returns the wallet addresses
Example return value:
```php
[
"1Headz2mYtpBRo6KFaaUEtcm5Kce6BZRJM",
"1JBKAM8W9jEnuGNvPRFjtpmeDGvfQx6PLU",
"19tjsa4nBeAtn48kcmW9Gg2wRFtm24GRG2"
]
```
@return array | [
"Returns",
"the",
"wallet",
"addresses"
] | f9bbec54be581356f36b5084b50037845a6d00c3 | https://github.com/headzoo/bitcoin-wallet-api/blob/f9bbec54be581356f36b5084b50037845a6d00c3/src/Headzoo/Bitcoin/Wallet/Api/Wallet.php#L626-L637 |
221,354 | headzoo/bitcoin-wallet-api | src/Headzoo/Bitcoin/Wallet/Api/Wallet.php | Wallet.getAddressesByAccount | public function getAddressesByAccount($account)
{
$args = [
(string)$account
];
return $this->rpc->query(__FUNCTION__, $args);
} | php | public function getAddressesByAccount($account)
{
$args = [
(string)$account
];
return $this->rpc->query(__FUNCTION__, $args);
} | [
"public",
"function",
"getAddressesByAccount",
"(",
"$",
"account",
")",
"{",
"$",
"args",
"=",
"[",
"(",
"string",
")",
"$",
"account",
"]",
";",
"return",
"$",
"this",
"->",
"rpc",
"->",
"query",
"(",
"__FUNCTION__",
",",
"$",
"args",
")",
";",
"}"... | Returns the addresses for the given account
@param string $account The account name, using "" to represent the default account
@return array | [
"Returns",
"the",
"addresses",
"for",
"the",
"given",
"account"
] | f9bbec54be581356f36b5084b50037845a6d00c3 | https://github.com/headzoo/bitcoin-wallet-api/blob/f9bbec54be581356f36b5084b50037845a6d00c3/src/Headzoo/Bitcoin/Wallet/Api/Wallet.php#L662-L668 |
221,355 | headzoo/bitcoin-wallet-api | src/Headzoo/Bitcoin/Wallet/Api/Wallet.php | Wallet.getRawChangeAddress | public function getRawChangeAddress($account)
{
$args = [
(string)$account
];
return $this->rpc->query(__FUNCTION__, $args);
} | php | public function getRawChangeAddress($account)
{
$args = [
(string)$account
];
return $this->rpc->query(__FUNCTION__, $args);
} | [
"public",
"function",
"getRawChangeAddress",
"(",
"$",
"account",
")",
"{",
"$",
"args",
"=",
"[",
"(",
"string",
")",
"$",
"account",
"]",
";",
"return",
"$",
"this",
"->",
"rpc",
"->",
"query",
"(",
"__FUNCTION__",
",",
"$",
"args",
")",
";",
"}"
] | Returns a new address for receiving change
This is for use with raw transactions, NOT normal use.
@param string $account Name of the account, using "" to represent the default account
@return string | [
"Returns",
"a",
"new",
"address",
"for",
"receiving",
"change"
] | f9bbec54be581356f36b5084b50037845a6d00c3 | https://github.com/headzoo/bitcoin-wallet-api/blob/f9bbec54be581356f36b5084b50037845a6d00c3/src/Headzoo/Bitcoin/Wallet/Api/Wallet.php#L678-L684 |
221,356 | headzoo/bitcoin-wallet-api | src/Headzoo/Bitcoin/Wallet/Api/Wallet.php | Wallet.getNewAddress | public function getNewAddress($account)
{
$args = [
(string)$account
];
return $this->rpc->query(__FUNCTION__, $args);
} | php | public function getNewAddress($account)
{
$args = [
(string)$account
];
return $this->rpc->query(__FUNCTION__, $args);
} | [
"public",
"function",
"getNewAddress",
"(",
"$",
"account",
")",
"{",
"$",
"args",
"=",
"[",
"(",
"string",
")",
"$",
"account",
"]",
";",
"return",
"$",
"this",
"->",
"rpc",
"->",
"query",
"(",
"__FUNCTION__",
",",
"$",
"args",
")",
";",
"}"
] | Returns a new address for receiving payments
If $account is specified (recommended), it is added to the address book so payments received with the address
will be credited to $account.
@param string $account The account name for the address to be linked to, using "" to represent the default account
@return string | [
"Returns",
"a",
"new",
"address",
"for",
"receiving",
"payments"
] | f9bbec54be581356f36b5084b50037845a6d00c3 | https://github.com/headzoo/bitcoin-wallet-api/blob/f9bbec54be581356f36b5084b50037845a6d00c3/src/Headzoo/Bitcoin/Wallet/Api/Wallet.php#L695-L701 |
221,357 | headzoo/bitcoin-wallet-api | src/Headzoo/Bitcoin/Wallet/Api/Wallet.php | Wallet.getNewMultiSignatureAddress | public function getNewMultiSignatureAddress($nrequired, array $keys)
{
$args = [
(int)$nrequired,
$keys
];
return $this->rpc->query("createMultiSig", $args);
} | php | public function getNewMultiSignatureAddress($nrequired, array $keys)
{
$args = [
(int)$nrequired,
$keys
];
return $this->rpc->query("createMultiSig", $args);
} | [
"public",
"function",
"getNewMultiSignatureAddress",
"(",
"$",
"nrequired",
",",
"array",
"$",
"keys",
")",
"{",
"$",
"args",
"=",
"[",
"(",
"int",
")",
"$",
"nrequired",
",",
"$",
"keys",
"]",
";",
"return",
"$",
"this",
"->",
"rpc",
"->",
"query",
... | Returns a new multi-signature address
Returns an array with the following keys:
```
"address" - (string) The multi-signature address
"redeemScript" - (string) The redeem script
```
@param int $nrequired Number of keys needed to redeem
@param array $keys Array of public keys
@return array | [
"Returns",
"a",
"new",
"multi",
"-",
"signature",
"address"
] | f9bbec54be581356f36b5084b50037845a6d00c3 | https://github.com/headzoo/bitcoin-wallet-api/blob/f9bbec54be581356f36b5084b50037845a6d00c3/src/Headzoo/Bitcoin/Wallet/Api/Wallet.php#L743-L750 |
221,358 | headzoo/bitcoin-wallet-api | src/Headzoo/Bitcoin/Wallet/Api/Wallet.php | Wallet.addMultiSignatureAddress | public function addMultiSignatureAddress($nrequired, array $keys, $account = null)
{
// Can't use null for $account. Must be left out of the args completely when not specified.
$args = [
(int)$nrequired,
$keys
];
if (null !== $account) {
$args[] = ... | php | public function addMultiSignatureAddress($nrequired, array $keys, $account = null)
{
// Can't use null for $account. Must be left out of the args completely when not specified.
$args = [
(int)$nrequired,
$keys
];
if (null !== $account) {
$args[] = ... | [
"public",
"function",
"addMultiSignatureAddress",
"(",
"$",
"nrequired",
",",
"array",
"$",
"keys",
",",
"$",
"account",
"=",
"null",
")",
"{",
"// Can't use null for $account. Must be left out of the args completely when not specified.",
"$",
"args",
"=",
"[",
"(",
"in... | Add a nrequired-to-sign multisignature address to the wallet
Each key is a address or hex-encoded public key. If $account is specified, assign address to $account.
Returns the the multi-signature address.
@param int $nrequired Number of keys needed to redeem
@param array $keys Array of public keys
@param ... | [
"Add",
"a",
"nrequired",
"-",
"to",
"-",
"sign",
"multisignature",
"address",
"to",
"the",
"wallet"
] | f9bbec54be581356f36b5084b50037845a6d00c3 | https://github.com/headzoo/bitcoin-wallet-api/blob/f9bbec54be581356f36b5084b50037845a6d00c3/src/Headzoo/Bitcoin/Wallet/Api/Wallet.php#L764-L775 |
221,359 | headzoo/bitcoin-wallet-api | src/Headzoo/Bitcoin/Wallet/Api/Wallet.php | Wallet.getPrivateKeyByAddress | public function getPrivateKeyByAddress($address)
{
$args = [
(string)$address
];
$priv_key = null;
try {
$priv_key = $this->rpc->query("dumpPrivKey", $args);
} catch (Exceptions\RPCException $e) {
if ($e->getCode() != RPCErrorCodes::WALLET... | php | public function getPrivateKeyByAddress($address)
{
$args = [
(string)$address
];
$priv_key = null;
try {
$priv_key = $this->rpc->query("dumpPrivKey", $args);
} catch (Exceptions\RPCException $e) {
if ($e->getCode() != RPCErrorCodes::WALLET... | [
"public",
"function",
"getPrivateKeyByAddress",
"(",
"$",
"address",
")",
"{",
"$",
"args",
"=",
"[",
"(",
"string",
")",
"$",
"address",
"]",
";",
"$",
"priv_key",
"=",
"null",
";",
"try",
"{",
"$",
"priv_key",
"=",
"$",
"this",
"->",
"rpc",
"->",
... | Returns the private key for the given address
Returns null when the address does not belong to any wallet account.
@param string $address The address for the private key
@return string
@throws Exceptions\RPCException | [
"Returns",
"the",
"private",
"key",
"for",
"the",
"given",
"address"
] | f9bbec54be581356f36b5084b50037845a6d00c3 | https://github.com/headzoo/bitcoin-wallet-api/blob/f9bbec54be581356f36b5084b50037845a6d00c3/src/Headzoo/Bitcoin/Wallet/Api/Wallet.php#L786-L802 |
221,360 | headzoo/bitcoin-wallet-api | src/Headzoo/Bitcoin/Wallet/Api/Wallet.php | Wallet.addPrivateKey | public function addPrivateKey($priv_key, $label, $rescan = true)
{
$args = [
(string)$priv_key,
(string)$label,
(bool)$rescan
];
return null === $this->rpc->query("importPrivKey", $args);
} | php | public function addPrivateKey($priv_key, $label, $rescan = true)
{
$args = [
(string)$priv_key,
(string)$label,
(bool)$rescan
];
return null === $this->rpc->query("importPrivKey", $args);
} | [
"public",
"function",
"addPrivateKey",
"(",
"$",
"priv_key",
",",
"$",
"label",
",",
"$",
"rescan",
"=",
"true",
")",
"{",
"$",
"args",
"=",
"[",
"(",
"string",
")",
"$",
"priv_key",
",",
"(",
"string",
")",
"$",
"label",
",",
"(",
"bool",
")",
"... | Adds a private key to the wallet
Rescanning may take a while looking for existing transactions, and may even freeze up the wallet.
@param string $priv_key The private key
@param string $label An optional label
@param bool $rescan Whether to rescan the wallet for transactions
@return bool | [
"Adds",
"a",
"private",
"key",
"to",
"the",
"wallet"
] | f9bbec54be581356f36b5084b50037845a6d00c3 | https://github.com/headzoo/bitcoin-wallet-api/blob/f9bbec54be581356f36b5084b50037845a6d00c3/src/Headzoo/Bitcoin/Wallet/Api/Wallet.php#L814-L822 |
221,361 | headzoo/bitcoin-wallet-api | src/Headzoo/Bitcoin/Wallet/Api/Wallet.php | Wallet.getBlock | public function getBlock($hash, $verbose = true)
{
$args = [
(string)$hash,
(bool)$verbose
];
return $this->rpc->query(__FUNCTION__, $args);
} | php | public function getBlock($hash, $verbose = true)
{
$args = [
(string)$hash,
(bool)$verbose
];
return $this->rpc->query(__FUNCTION__, $args);
} | [
"public",
"function",
"getBlock",
"(",
"$",
"hash",
",",
"$",
"verbose",
"=",
"true",
")",
"{",
"$",
"args",
"=",
"[",
"(",
"string",
")",
"$",
"hash",
",",
"(",
"bool",
")",
"$",
"verbose",
"]",
";",
"return",
"$",
"this",
"->",
"rpc",
"->",
"... | Returns information about the block with the given hash
When $verbose is set to false, this method returns the serialized and hex-encoded block data.
When $verbose is set to true, the return value will be an array with the following keys:
```
"hash" - (string) The block hash (same as provided).
"confirm... | [
"Returns",
"information",
"about",
"the",
"block",
"with",
"the",
"given",
"hash"
] | f9bbec54be581356f36b5084b50037845a6d00c3 | https://github.com/headzoo/bitcoin-wallet-api/blob/f9bbec54be581356f36b5084b50037845a6d00c3/src/Headzoo/Bitcoin/Wallet/Api/Wallet.php#L850-L857 |
221,362 | headzoo/bitcoin-wallet-api | src/Headzoo/Bitcoin/Wallet/Api/Wallet.php | Wallet.getTransaction | public function getTransaction($txid)
{
$args = [
(string)$txid
];
return $this->rpc->query(__FUNCTION__, $args);
} | php | public function getTransaction($txid)
{
$args = [
(string)$txid
];
return $this->rpc->query(__FUNCTION__, $args);
} | [
"public",
"function",
"getTransaction",
"(",
"$",
"txid",
")",
"{",
"$",
"args",
"=",
"[",
"(",
"string",
")",
"$",
"txid",
"]",
";",
"return",
"$",
"this",
"->",
"rpc",
"->",
"query",
"(",
"__FUNCTION__",
",",
"$",
"args",
")",
";",
"}"
] | Returns detailed information about in-wallet transaction
This method cannot be used to get information about non-wallet transactions. Use getRawTransaction() for
non-wallet transactions.
The returned array will contain the following keys:
```
"amount" - (double) The transaction amount.
"fee" - (doub... | [
"Returns",
"detailed",
"information",
"about",
"in",
"-",
"wallet",
"transaction"
] | f9bbec54be581356f36b5084b50037845a6d00c3 | https://github.com/headzoo/bitcoin-wallet-api/blob/f9bbec54be581356f36b5084b50037845a6d00c3/src/Headzoo/Bitcoin/Wallet/Api/Wallet.php#L941-L947 |
221,363 | headzoo/bitcoin-wallet-api | src/Headzoo/Bitcoin/Wallet/Api/Wallet.php | Wallet.getRawTransaction | public function getRawTransaction($txid, $verbose = 0)
{
$args = [
(string)$txid,
(int)$verbose
];
return $this->rpc->query(__FUNCTION__, $args);
} | php | public function getRawTransaction($txid, $verbose = 0)
{
$args = [
(string)$txid,
(int)$verbose
];
return $this->rpc->query(__FUNCTION__, $args);
} | [
"public",
"function",
"getRawTransaction",
"(",
"$",
"txid",
",",
"$",
"verbose",
"=",
"0",
")",
"{",
"$",
"args",
"=",
"[",
"(",
"string",
")",
"$",
"txid",
",",
"(",
"int",
")",
"$",
"verbose",
"]",
";",
"return",
"$",
"this",
"->",
"rpc",
"->"... | Returns raw transaction representation for given transaction id
Returns the raw transaction data as a string when $verbose is 0. Use decodeRawTransaction() to convert the
transaction data into an array.
Returns an array with the following keys when $verbose is 1.
```
"hex" - (string) The serialized, he... | [
"Returns",
"raw",
"transaction",
"representation",
"for",
"given",
"transaction",
"id"
] | f9bbec54be581356f36b5084b50037845a6d00c3 | https://github.com/headzoo/bitcoin-wallet-api/blob/f9bbec54be581356f36b5084b50037845a6d00c3/src/Headzoo/Bitcoin/Wallet/Api/Wallet.php#L1035-L1042 |
221,364 | headzoo/bitcoin-wallet-api | src/Headzoo/Bitcoin/Wallet/Api/Wallet.php | Wallet.getTransactionOut | public function getTransactionOut($txid, $n, $include_mem_pool = true)
{
$args = [
(string)$txid,
(int)$n,
(bool)$include_mem_pool
];
return $this->rpc->query("getTxOut", $args);
} | php | public function getTransactionOut($txid, $n, $include_mem_pool = true)
{
$args = [
(string)$txid,
(int)$n,
(bool)$include_mem_pool
];
return $this->rpc->query("getTxOut", $args);
} | [
"public",
"function",
"getTransactionOut",
"(",
"$",
"txid",
",",
"$",
"n",
",",
"$",
"include_mem_pool",
"=",
"true",
")",
"{",
"$",
"args",
"=",
"[",
"(",
"string",
")",
"$",
"txid",
",",
"(",
"int",
")",
"$",
"n",
",",
"(",
"bool",
")",
"$",
... | Returns details about an unspent transaction output
Returns an array with the following keys:
```
"bestblock" - (string) The block hash.
"confirmations" - (int) The number of confirmations.
"value" - (double) The transaction value.
"scriptPubKey" - (array) The script, an array with... | [
"Returns",
"details",
"about",
"an",
"unspent",
"transaction",
"output"
] | f9bbec54be581356f36b5084b50037845a6d00c3 | https://github.com/headzoo/bitcoin-wallet-api/blob/f9bbec54be581356f36b5084b50037845a6d00c3/src/Headzoo/Bitcoin/Wallet/Api/Wallet.php#L1067-L1075 |
221,365 | headzoo/bitcoin-wallet-api | src/Headzoo/Bitcoin/Wallet/Api/Wallet.php | Wallet.setLockUnspent | public function setLockUnspent($unlock, array $objs = [])
{
$args = [
(bool)$unlock,
$objs
];
return $this->rpc->query("lockUnspent", $args);
} | php | public function setLockUnspent($unlock, array $objs = [])
{
$args = [
(bool)$unlock,
$objs
];
return $this->rpc->query("lockUnspent", $args);
} | [
"public",
"function",
"setLockUnspent",
"(",
"$",
"unlock",
",",
"array",
"$",
"objs",
"=",
"[",
"]",
")",
"{",
"$",
"args",
"=",
"[",
"(",
"bool",
")",
"$",
"unlock",
",",
"$",
"objs",
"]",
";",
"return",
"$",
"this",
"->",
"rpc",
"->",
"query",... | Updates list of temporarily unspendable outputs
Temporarily lock (true) or unlock (false) specified transaction outputs.
@param bool $unlock Whether to unlock (true) or lock (false) the specified transactions
@param array $objs An array of objects. Each object has "txid" (string) and "vout" (numeric)
@return boo... | [
"Updates",
"list",
"of",
"temporarily",
"unspendable",
"outputs"
] | f9bbec54be581356f36b5084b50037845a6d00c3 | https://github.com/headzoo/bitcoin-wallet-api/blob/f9bbec54be581356f36b5084b50037845a6d00c3/src/Headzoo/Bitcoin/Wallet/Api/Wallet.php#L1148-L1155 |
221,366 | headzoo/bitcoin-wallet-api | src/Headzoo/Bitcoin/Wallet/Api/Wallet.php | Wallet.getBlockTemplate | public function getBlockTemplate(array $capabilities = [], $mode = null)
{
$params = new \stdClass();
$params->capabilities = $capabilities;
if (null !== $mode) {
$params->mode = $mode;
}
$args = [
$params
];
return $this->rpc->query(__... | php | public function getBlockTemplate(array $capabilities = [], $mode = null)
{
$params = new \stdClass();
$params->capabilities = $capabilities;
if (null !== $mode) {
$params->mode = $mode;
}
$args = [
$params
];
return $this->rpc->query(__... | [
"public",
"function",
"getBlockTemplate",
"(",
"array",
"$",
"capabilities",
"=",
"[",
"]",
",",
"$",
"mode",
"=",
"null",
")",
"{",
"$",
"params",
"=",
"new",
"\\",
"stdClass",
"(",
")",
";",
"$",
"params",
"->",
"capabilities",
"=",
"$",
"capabilitie... | Returns data needed to construct a block to work on
If the $mode argument is set, that is used to explicitly select between the default "template"
request or a "proposal".
The returned array contains the following keys:
```
"version" - (int) The block version.
"previousblockhash" - (string) The... | [
"Returns",
"data",
"needed",
"to",
"construct",
"a",
"block",
"to",
"work",
"on"
] | f9bbec54be581356f36b5084b50037845a6d00c3 | https://github.com/headzoo/bitcoin-wallet-api/blob/f9bbec54be581356f36b5084b50037845a6d00c3/src/Headzoo/Bitcoin/Wallet/Api/Wallet.php#L1195-L1206 |
221,367 | headzoo/bitcoin-wallet-api | src/Headzoo/Bitcoin/Wallet/Api/Wallet.php | Wallet.getWork | public function getWork($data = null)
{
// No arguments should be sent when $data is null.
if (null === $data) {
$args = [];
} else {
$args = [
(string)$data
];
}
return $this->rpc->query(__FUNCTION__, $args);
} | php | public function getWork($data = null)
{
// No arguments should be sent when $data is null.
if (null === $data) {
$args = [];
} else {
$args = [
(string)$data
];
}
return $this->rpc->query(__FUNCTION__, $args);
} | [
"public",
"function",
"getWork",
"(",
"$",
"data",
"=",
"null",
")",
"{",
"// No arguments should be sent when $data is null.",
"if",
"(",
"null",
"===",
"$",
"data",
")",
"{",
"$",
"args",
"=",
"[",
"]",
";",
"}",
"else",
"{",
"$",
"args",
"=",
"[",
"... | Returns work data, or works on existing data
Returns formatted hash data to work on if $data is not specified. Tries to solve the block if $data is provided,
and returns a boolean value indicating success or failure.
When $data is not specified, the return value will be an array with the following keys:
```
"midstate... | [
"Returns",
"work",
"data",
"or",
"works",
"on",
"existing",
"data"
] | f9bbec54be581356f36b5084b50037845a6d00c3 | https://github.com/headzoo/bitcoin-wallet-api/blob/f9bbec54be581356f36b5084b50037845a6d00c3/src/Headzoo/Bitcoin/Wallet/Api/Wallet.php#L1225-L1236 |
221,368 | headzoo/bitcoin-wallet-api | src/Headzoo/Bitcoin/Wallet/Api/Wallet.php | Wallet.createRawTransaction | public function createRawTransaction(array $transactions, array $addresses)
{
$args = [
$transactions,
$addresses
];
return $this->rpc->query(__FUNCTION__, $args);
} | php | public function createRawTransaction(array $transactions, array $addresses)
{
$args = [
$transactions,
$addresses
];
return $this->rpc->query(__FUNCTION__, $args);
} | [
"public",
"function",
"createRawTransaction",
"(",
"array",
"$",
"transactions",
",",
"array",
"$",
"addresses",
")",
"{",
"$",
"args",
"=",
"[",
"$",
"transactions",
",",
"$",
"addresses",
"]",
";",
"return",
"$",
"this",
"->",
"rpc",
"->",
"query",
"("... | Returns a hex-encoded raw transaction spending the given inputs and sending to the given addresses
The $transactions argument is a multidimensional array, which each value being an array with the following keys:
```
"txid" - (string) The transaction id.
"vout" - (int) The output number.
```
The $addresses argume... | [
"Returns",
"a",
"hex",
"-",
"encoded",
"raw",
"transaction",
"spending",
"the",
"given",
"inputs",
"and",
"sending",
"to",
"the",
"given",
"addresses"
] | f9bbec54be581356f36b5084b50037845a6d00c3 | https://github.com/headzoo/bitcoin-wallet-api/blob/f9bbec54be581356f36b5084b50037845a6d00c3/src/Headzoo/Bitcoin/Wallet/Api/Wallet.php#L1318-L1325 |
221,369 | headzoo/bitcoin-wallet-api | src/Headzoo/Bitcoin/Wallet/Api/Wallet.php | Wallet.decodeRawTransaction | public function decodeRawTransaction($hex_string)
{
$args = [
(string)$hex_string
];
return $this->rpc->query(__FUNCTION__, $args);
} | php | public function decodeRawTransaction($hex_string)
{
$args = [
(string)$hex_string
];
return $this->rpc->query(__FUNCTION__, $args);
} | [
"public",
"function",
"decodeRawTransaction",
"(",
"$",
"hex_string",
")",
"{",
"$",
"args",
"=",
"[",
"(",
"string",
")",
"$",
"hex_string",
"]",
";",
"return",
"$",
"this",
"->",
"rpc",
"->",
"query",
"(",
"__FUNCTION__",
",",
"$",
"args",
")",
";",
... | Decodes a raw serialized transaction
Given a serialized, hex-encoded transaction, the method decodes it, and returns an array of the transaction
information.
Returns an array with the following keys:
```
"hex" - (string) The serialized, hex-encoded data.
"txid" - (string) The transaction ... | [
"Decodes",
"a",
"raw",
"serialized",
"transaction"
] | f9bbec54be581356f36b5084b50037845a6d00c3 | https://github.com/headzoo/bitcoin-wallet-api/blob/f9bbec54be581356f36b5084b50037845a6d00c3/src/Headzoo/Bitcoin/Wallet/Api/Wallet.php#L1364-L1370 |
221,370 | headzoo/bitcoin-wallet-api | src/Headzoo/Bitcoin/Wallet/Api/Wallet.php | Wallet.encrypt | public function encrypt($pass_phrase)
{
$args = [
(string)$pass_phrase
];
return null === $this->rpc->query("encryptWallet", $args);
} | php | public function encrypt($pass_phrase)
{
$args = [
(string)$pass_phrase
];
return null === $this->rpc->query("encryptWallet", $args);
} | [
"public",
"function",
"encrypt",
"(",
"$",
"pass_phrase",
")",
"{",
"$",
"args",
"=",
"[",
"(",
"string",
")",
"$",
"pass_phrase",
"]",
";",
"return",
"null",
"===",
"$",
"this",
"->",
"rpc",
"->",
"query",
"(",
"\"encryptWallet\"",
",",
"$",
"args",
... | Encrypts the wallet with the given pass phrase
After this, any calls that interact with private keys such as sending or signing will require the passphrase to
be set prior the making these calls. Use the unlock() for this, and then lock().
**Note:** This will shutdown the server.
@param string $pass_phrase The pass... | [
"Encrypts",
"the",
"wallet",
"with",
"the",
"given",
"pass",
"phrase"
] | f9bbec54be581356f36b5084b50037845a6d00c3 | https://github.com/headzoo/bitcoin-wallet-api/blob/f9bbec54be581356f36b5084b50037845a6d00c3/src/Headzoo/Bitcoin/Wallet/Api/Wallet.php#L1383-L1389 |
221,371 | headzoo/bitcoin-wallet-api | src/Headzoo/Bitcoin/Wallet/Api/Wallet.php | Wallet.changePassPhrase | public function changePassPhrase($old_passphrase, $new_passphrase)
{
$args = [
(string)$old_passphrase,
(string)$new_passphrase
];
return null === $this->rpc->query("walletPassPhraseChange", $args);
} | php | public function changePassPhrase($old_passphrase, $new_passphrase)
{
$args = [
(string)$old_passphrase,
(string)$new_passphrase
];
return null === $this->rpc->query("walletPassPhraseChange", $args);
} | [
"public",
"function",
"changePassPhrase",
"(",
"$",
"old_passphrase",
",",
"$",
"new_passphrase",
")",
"{",
"$",
"args",
"=",
"[",
"(",
"string",
")",
"$",
"old_passphrase",
",",
"(",
"string",
")",
"$",
"new_passphrase",
"]",
";",
"return",
"null",
"===",... | Updates the wallet passphrase
@param string $old_passphrase The old pass phrase
@param string $new_passphrase The new pass phrase
@return array | [
"Updates",
"the",
"wallet",
"passphrase"
] | f9bbec54be581356f36b5084b50037845a6d00c3 | https://github.com/headzoo/bitcoin-wallet-api/blob/f9bbec54be581356f36b5084b50037845a6d00c3/src/Headzoo/Bitcoin/Wallet/Api/Wallet.php#L1437-L1444 |
221,372 | mysql-workbench-schema-exporter/doctrine2-exporter | lib/MwbExporter/Formatter/Doctrine2/Annotation/Model/Table.php | Table.addPrefix | public function addPrefix($annotation = null)
{
if (null === $this->ormPrefix) {
$this->ormPrefix = '@'.$this->getConfig()->get(Formatter::CFG_ANNOTATION_PREFIX);
}
return $this->ormPrefix.($annotation ? $annotation : '');
} | php | public function addPrefix($annotation = null)
{
if (null === $this->ormPrefix) {
$this->ormPrefix = '@'.$this->getConfig()->get(Formatter::CFG_ANNOTATION_PREFIX);
}
return $this->ormPrefix.($annotation ? $annotation : '');
} | [
"public",
"function",
"addPrefix",
"(",
"$",
"annotation",
"=",
"null",
")",
"{",
"if",
"(",
"null",
"===",
"$",
"this",
"->",
"ormPrefix",
")",
"{",
"$",
"this",
"->",
"ormPrefix",
"=",
"'@'",
".",
"$",
"this",
"->",
"getConfig",
"(",
")",
"->",
"... | Get annotation prefix.
@param string $annotation Annotation type
@return string | [
"Get",
"annotation",
"prefix",
"."
] | a62b13cbf4824c05cc791034ffedf419242ba0cb | https://github.com/mysql-workbench-schema-exporter/doctrine2-exporter/blob/a62b13cbf4824c05cc791034ffedf419242ba0cb/lib/MwbExporter/Formatter/Doctrine2/Annotation/Model/Table.php#L78-L85 |
221,373 | mysql-workbench-schema-exporter/doctrine2-exporter | lib/MwbExporter/Formatter/Doctrine2/Annotation/Model/Table.php | Table.quoteIdentifier | public function quoteIdentifier($value)
{
$quote = false;
switch ($this->getConfig()->get(Formatter::CFG_QUOTE_IDENTIFIER_STRATEGY)) {
case Formatter::QUOTE_IDENTIFIER_AUTO:
$quote = ReservedWords::isReserved($value);
break;
case Formatter::QU... | php | public function quoteIdentifier($value)
{
$quote = false;
switch ($this->getConfig()->get(Formatter::CFG_QUOTE_IDENTIFIER_STRATEGY)) {
case Formatter::QUOTE_IDENTIFIER_AUTO:
$quote = ReservedWords::isReserved($value);
break;
case Formatter::QU... | [
"public",
"function",
"quoteIdentifier",
"(",
"$",
"value",
")",
"{",
"$",
"quote",
"=",
"false",
";",
"switch",
"(",
"$",
"this",
"->",
"getConfig",
"(",
")",
"->",
"get",
"(",
"Formatter",
"::",
"CFG_QUOTE_IDENTIFIER_STRATEGY",
")",
")",
"{",
"case",
"... | Quote identifier if necessary.
@param string $value The identifier to quote
@return string | [
"Quote",
"identifier",
"if",
"necessary",
"."
] | a62b13cbf4824c05cc791034ffedf419242ba0cb | https://github.com/mysql-workbench-schema-exporter/doctrine2-exporter/blob/a62b13cbf4824c05cc791034ffedf419242ba0cb/lib/MwbExporter/Formatter/Doctrine2/Annotation/Model/Table.php#L93-L107 |
221,374 | mysql-workbench-schema-exporter/doctrine2-exporter | lib/MwbExporter/Formatter/Doctrine2/Annotation/Model/Table.php | Table.getAnnotation | public function getAnnotation($annotation, $content = null, $options = array())
{
return new Annotation($this->addPrefix($annotation), $content, $options);
} | php | public function getAnnotation($annotation, $content = null, $options = array())
{
return new Annotation($this->addPrefix($annotation), $content, $options);
} | [
"public",
"function",
"getAnnotation",
"(",
"$",
"annotation",
",",
"$",
"content",
"=",
"null",
",",
"$",
"options",
"=",
"array",
"(",
")",
")",
"{",
"return",
"new",
"Annotation",
"(",
"$",
"this",
"->",
"addPrefix",
"(",
"$",
"annotation",
")",
","... | Get annotation object.
@param string $annotation The annotation name
@param mixed $content The annotation content
@param array $options The annotation options
@return \MwbExporter\Object\Annotation | [
"Get",
"annotation",
"object",
"."
] | a62b13cbf4824c05cc791034ffedf419242ba0cb | https://github.com/mysql-workbench-schema-exporter/doctrine2-exporter/blob/a62b13cbf4824c05cc791034ffedf419242ba0cb/lib/MwbExporter/Formatter/Doctrine2/Annotation/Model/Table.php#L117-L120 |
221,375 | mysql-workbench-schema-exporter/doctrine2-exporter | lib/MwbExporter/Formatter/Doctrine2/Annotation/Model/Table.php | Table.getIndexesAnnotation | protected function getIndexesAnnotation($type = 'Index')
{
$indices = array();
foreach ($this->getTableIndices() as $index) {
switch (true) {
case $type === 'Index' && $index->isIndex():
case $type === 'UniqueConstraint' && $index->isUnique():
... | php | protected function getIndexesAnnotation($type = 'Index')
{
$indices = array();
foreach ($this->getTableIndices() as $index) {
switch (true) {
case $type === 'Index' && $index->isIndex():
case $type === 'UniqueConstraint' && $index->isUnique():
... | [
"protected",
"function",
"getIndexesAnnotation",
"(",
"$",
"type",
"=",
"'Index'",
")",
"{",
"$",
"indices",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"this",
"->",
"getTableIndices",
"(",
")",
"as",
"$",
"index",
")",
"{",
"switch",
"(",
"true... | Get indexes annotation.
@param string $type Index annotation type, Index or UniqueConstraint
@return array|null | [
"Get",
"indexes",
"annotation",
"."
] | a62b13cbf4824c05cc791034ffedf419242ba0cb | https://github.com/mysql-workbench-schema-exporter/doctrine2-exporter/blob/a62b13cbf4824c05cc791034ffedf419242ba0cb/lib/MwbExporter/Formatter/Doctrine2/Annotation/Model/Table.php#L128-L148 |
221,376 | mysql-workbench-schema-exporter/doctrine2-exporter | lib/MwbExporter/Formatter/Doctrine2/Annotation/Model/Table.php | Table.getJoinAnnotation | public function getJoinAnnotation($joinType, $entity, $mappedBy = null, $inversedBy = null)
{
return $this->getAnnotation($joinType, array('targetEntity' => $entity, 'mappedBy' => $mappedBy, 'inversedBy' => $inversedBy));
} | php | public function getJoinAnnotation($joinType, $entity, $mappedBy = null, $inversedBy = null)
{
return $this->getAnnotation($joinType, array('targetEntity' => $entity, 'mappedBy' => $mappedBy, 'inversedBy' => $inversedBy));
} | [
"public",
"function",
"getJoinAnnotation",
"(",
"$",
"joinType",
",",
"$",
"entity",
",",
"$",
"mappedBy",
"=",
"null",
",",
"$",
"inversedBy",
"=",
"null",
")",
"{",
"return",
"$",
"this",
"->",
"getAnnotation",
"(",
"$",
"joinType",
",",
"array",
"(",
... | Get join annotation.
@param string $joinType Join type
@param string $entity Entity name
@param string $mappedBy Column mapping
@param string $inversedBy Reverse column mapping
@return \MwbExporter\Object\Annotation | [
"Get",
"join",
"annotation",
"."
] | a62b13cbf4824c05cc791034ffedf419242ba0cb | https://github.com/mysql-workbench-schema-exporter/doctrine2-exporter/blob/a62b13cbf4824c05cc791034ffedf419242ba0cb/lib/MwbExporter/Formatter/Doctrine2/Annotation/Model/Table.php#L159-L162 |
221,377 | mysql-workbench-schema-exporter/doctrine2-exporter | lib/MwbExporter/Formatter/Doctrine2/Annotation/Model/Table.php | Table.getClassFileName | protected function getClassFileName($base = false)
{
return ($base ? $this->getTableFileName(null, array('%entity%' => 'Base'.DIRECTORY_SEPARATOR.'Base'.$this->getModelName())) : $this->getTableFileName());
} | php | protected function getClassFileName($base = false)
{
return ($base ? $this->getTableFileName(null, array('%entity%' => 'Base'.DIRECTORY_SEPARATOR.'Base'.$this->getModelName())) : $this->getTableFileName());
} | [
"protected",
"function",
"getClassFileName",
"(",
"$",
"base",
"=",
"false",
")",
"{",
"return",
"(",
"$",
"base",
"?",
"$",
"this",
"->",
"getTableFileName",
"(",
"null",
",",
"array",
"(",
"'%entity%'",
"=>",
"'Base'",
".",
"DIRECTORY_SEPARATOR",
".",
"'... | Get the generated class name.
@param bool $base
@return string | [
"Get",
"the",
"generated",
"class",
"name",
"."
] | a62b13cbf4824c05cc791034ffedf419242ba0cb | https://github.com/mysql-workbench-schema-exporter/doctrine2-exporter/blob/a62b13cbf4824c05cc791034ffedf419242ba0cb/lib/MwbExporter/Formatter/Doctrine2/Annotation/Model/Table.php#L357-L360 |
221,378 | mysql-workbench-schema-exporter/doctrine2-exporter | lib/MwbExporter/Formatter/Doctrine2/Annotation/Model/Table.php | Table.getUsedClasses | protected function getUsedClasses()
{
$uses = array();
if ($orm = $this->getOrmUse()) {
$uses[] = $orm;
}
if (count($this->getTableM2MRelations()) || count($this->getAllLocalForeignKeys())) {
$uses[] = $this->getCollectionClass();
}
return $us... | php | protected function getUsedClasses()
{
$uses = array();
if ($orm = $this->getOrmUse()) {
$uses[] = $orm;
}
if (count($this->getTableM2MRelations()) || count($this->getAllLocalForeignKeys())) {
$uses[] = $this->getCollectionClass();
}
return $us... | [
"protected",
"function",
"getUsedClasses",
"(",
")",
"{",
"$",
"uses",
"=",
"array",
"(",
")",
";",
"if",
"(",
"$",
"orm",
"=",
"$",
"this",
"->",
"getOrmUse",
"(",
")",
")",
"{",
"$",
"uses",
"[",
"]",
"=",
"$",
"orm",
";",
"}",
"if",
"(",
"... | Get used classes.
@return array | [
"Get",
"used",
"classes",
"."
] | a62b13cbf4824c05cc791034ffedf419242ba0cb | https://github.com/mysql-workbench-schema-exporter/doctrine2-exporter/blob/a62b13cbf4824c05cc791034ffedf419242ba0cb/lib/MwbExporter/Formatter/Doctrine2/Annotation/Model/Table.php#L429-L440 |
221,379 | webcreate/vcs | src/Webcreate/Vcs/Common/Adapter/CliAdapter.php | CliAdapter.parse | protected function parse($command, array $arguments = array(), $output)
{
if (null !== $this->parser) {
return $this->parser->parse($command, $arguments, $output);
}
return $output;
} | php | protected function parse($command, array $arguments = array(), $output)
{
if (null !== $this->parser) {
return $this->parser->parse($command, $arguments, $output);
}
return $output;
} | [
"protected",
"function",
"parse",
"(",
"$",
"command",
",",
"array",
"$",
"arguments",
"=",
"array",
"(",
")",
",",
"$",
"output",
")",
"{",
"if",
"(",
"null",
"!==",
"$",
"this",
"->",
"parser",
")",
"{",
"return",
"$",
"this",
"->",
"parser",
"->... | Delegate output to output parser when a parser is set,
otherwise returns the raw output
@param string $command
@param array $arguments
@param string $output
@return mixed | [
"Delegate",
"output",
"to",
"output",
"parser",
"when",
"a",
"parser",
"is",
"set",
"otherwise",
"returns",
"the",
"raw",
"output"
] | 31a680f2501c4e5a599e8dd3ffbc8c0a5185c8ad | https://github.com/webcreate/vcs/blob/31a680f2501c4e5a599e8dd3ffbc8c0a5185c8ad/src/Webcreate/Vcs/Common/Adapter/CliAdapter.php#L192-L199 |
221,380 | mysql-workbench-schema-exporter/doctrine2-exporter | lib/MwbExporter/Formatter/Doctrine2/Yaml/Model/Table.php | Table.getJoins | protected function getJoins(ForeignKey $fkey, $owningSide = true)
{
$joins = array();
$lcols = $owningSide ? $fkey->getForeigns() : $fkey->getLocals();
$fcols = $owningSide ? $fkey->getLocals() : $fkey->getForeigns();
$onDelete = $this->getFormatter()->getDeleteRule($fkey->getParamet... | php | protected function getJoins(ForeignKey $fkey, $owningSide = true)
{
$joins = array();
$lcols = $owningSide ? $fkey->getForeigns() : $fkey->getLocals();
$fcols = $owningSide ? $fkey->getLocals() : $fkey->getForeigns();
$onDelete = $this->getFormatter()->getDeleteRule($fkey->getParamet... | [
"protected",
"function",
"getJoins",
"(",
"ForeignKey",
"$",
"fkey",
",",
"$",
"owningSide",
"=",
"true",
")",
"{",
"$",
"joins",
"=",
"array",
"(",
")",
";",
"$",
"lcols",
"=",
"$",
"owningSide",
"?",
"$",
"fkey",
"->",
"getForeigns",
"(",
")",
":",... | Get foreign key join descriptor.
@param \MwbExporter\Model\ForeignKey $fkey Foreign key
@param string $owningSide Is join for owning side or vice versa
@return array | [
"Get",
"foreign",
"key",
"join",
"descriptor",
"."
] | a62b13cbf4824c05cc791034ffedf419242ba0cb | https://github.com/mysql-workbench-schema-exporter/doctrine2-exporter/blob/a62b13cbf4824c05cc791034ffedf419242ba0cb/lib/MwbExporter/Formatter/Doctrine2/Yaml/Model/Table.php#L322-L338 |
221,381 | webcreate/vcs | src/Webcreate/Vcs/Git.php | Git.checkout | public function checkout($dest = null)
{
$temporary = $this->isTemporary;
if (true === is_null($dest)) {
$realdest = $this->cwd;
} else {
$realdest = $dest;
}
$head = $this->getHead();
$branch = $head->getName();
$this->dispatch(VcsE... | php | public function checkout($dest = null)
{
$temporary = $this->isTemporary;
if (true === is_null($dest)) {
$realdest = $this->cwd;
} else {
$realdest = $dest;
}
$head = $this->getHead();
$branch = $head->getName();
$this->dispatch(VcsE... | [
"public",
"function",
"checkout",
"(",
"$",
"dest",
"=",
"null",
")",
"{",
"$",
"temporary",
"=",
"$",
"this",
"->",
"isTemporary",
";",
"if",
"(",
"true",
"===",
"is_null",
"(",
"$",
"dest",
")",
")",
"{",
"$",
"realdest",
"=",
"$",
"this",
"->",
... | Perform a clone operation
@param string|null $dest | [
"Perform",
"a",
"clone",
"operation"
] | 31a680f2501c4e5a599e8dd3ffbc8c0a5185c8ad | https://github.com/webcreate/vcs/blob/31a680f2501c4e5a599e8dd3ffbc8c0a5185c8ad/src/Webcreate/Vcs/Git.php#L71-L99 |
221,382 | headzoo/bitcoin-wallet-api | src/Headzoo/Bitcoin/Wallet/Api/RPCPool.php | RPCPool.get | public function get()
{
$rpc = null;
if ($this->count > 0) {
$rpc = $this->items[$this->index];
if (++$this->index > $this->count - 1) {
$this->index = 0;
}
}
return $rpc;
} | php | public function get()
{
$rpc = null;
if ($this->count > 0) {
$rpc = $this->items[$this->index];
if (++$this->index > $this->count - 1) {
$this->index = 0;
}
}
return $rpc;
} | [
"public",
"function",
"get",
"(",
")",
"{",
"$",
"rpc",
"=",
"null",
";",
"if",
"(",
"$",
"this",
"->",
"count",
">",
"0",
")",
"{",
"$",
"rpc",
"=",
"$",
"this",
"->",
"items",
"[",
"$",
"this",
"->",
"index",
"]",
";",
"if",
"(",
"++",
"$... | Returns an JsonRPCInterface instance from the pool
Returns null when there are no servers in the pool.
@return JsonRPCInterface|null | [
"Returns",
"an",
"JsonRPCInterface",
"instance",
"from",
"the",
"pool"
] | f9bbec54be581356f36b5084b50037845a6d00c3 | https://github.com/headzoo/bitcoin-wallet-api/blob/f9bbec54be581356f36b5084b50037845a6d00c3/src/Headzoo/Bitcoin/Wallet/Api/RPCPool.php#L75-L86 |
221,383 | mdmsoft/yii2-ar-behaviors | RelationBehavior.php | RelationBehavior.hasRelatedErrors | public function hasRelatedErrors($relationName = null)
{
if ($relationName === null) {
foreach ($this->_relatedErrors as $errors) {
if (!empty($errors)) {
return true;
}
}
return false;
} else {
retur... | php | public function hasRelatedErrors($relationName = null)
{
if ($relationName === null) {
foreach ($this->_relatedErrors as $errors) {
if (!empty($errors)) {
return true;
}
}
return false;
} else {
retur... | [
"public",
"function",
"hasRelatedErrors",
"(",
"$",
"relationName",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"relationName",
"===",
"null",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"_relatedErrors",
"as",
"$",
"errors",
")",
"{",
"if",
"(",
"!",
"emp... | Check if relation has error.
@param string $relationName
@return boolean | [
"Check",
"if",
"relation",
"has",
"error",
"."
] | 16985ebe3fdf9cd67b0c58900adccbe816c16dc3 | https://github.com/mdmsoft/yii2-ar-behaviors/blob/16985ebe3fdf9cd67b0c58900adccbe816c16dc3/RelationBehavior.php#L355-L367 |
221,384 | mysql-workbench-schema-exporter/doctrine2-exporter | lib/MwbExporter/Formatter/Doctrine2/Model/Table.php | Table.getEntityNamespace | public function getEntityNamespace()
{
$namespace = '';
if (($bundleNamespace = $this->parseComment('bundleNamespace')) || ($bundleNamespace = $this->getConfig()->get(Formatter::CFG_BUNDLE_NAMESPACE))) {
$namespace = $bundleNamespace.'\\';
}
if ($entityNamespace = $this->... | php | public function getEntityNamespace()
{
$namespace = '';
if (($bundleNamespace = $this->parseComment('bundleNamespace')) || ($bundleNamespace = $this->getConfig()->get(Formatter::CFG_BUNDLE_NAMESPACE))) {
$namespace = $bundleNamespace.'\\';
}
if ($entityNamespace = $this->... | [
"public",
"function",
"getEntityNamespace",
"(",
")",
"{",
"$",
"namespace",
"=",
"''",
";",
"if",
"(",
"(",
"$",
"bundleNamespace",
"=",
"$",
"this",
"->",
"parseComment",
"(",
"'bundleNamespace'",
")",
")",
"||",
"(",
"$",
"bundleNamespace",
"=",
"$",
... | Get the entity namespace.
@return string | [
"Get",
"the",
"entity",
"namespace",
"."
] | a62b13cbf4824c05cc791034ffedf419242ba0cb | https://github.com/mysql-workbench-schema-exporter/doctrine2-exporter/blob/a62b13cbf4824c05cc791034ffedf419242ba0cb/lib/MwbExporter/Formatter/Doctrine2/Model/Table.php#L40-L53 |
221,385 | mysql-workbench-schema-exporter/doctrine2-exporter | lib/MwbExporter/Formatter/Doctrine2/Model/Table.php | Table.getNamespace | public function getNamespace($class = null, $absolute = true, $base = false)
{
return sprintf(
'%s%s\%s',
$absolute ? '\\' : '',
$base ? $this->getBaseEntityNamespace() : $this->getEntityNamespace(),
null === $class ? $this->getModelName() : $class
);
... | php | public function getNamespace($class = null, $absolute = true, $base = false)
{
return sprintf(
'%s%s\%s',
$absolute ? '\\' : '',
$base ? $this->getBaseEntityNamespace() : $this->getEntityNamespace(),
null === $class ? $this->getModelName() : $class
);
... | [
"public",
"function",
"getNamespace",
"(",
"$",
"class",
"=",
"null",
",",
"$",
"absolute",
"=",
"true",
",",
"$",
"base",
"=",
"false",
")",
"{",
"return",
"sprintf",
"(",
"'%s%s\\%s'",
",",
"$",
"absolute",
"?",
"'\\\\'",
":",
"''",
",",
"$",
"base... | Get namespace of a class.
@param string $class The class name
@return string | [
"Get",
"namespace",
"of",
"a",
"class",
"."
] | a62b13cbf4824c05cc791034ffedf419242ba0cb | https://github.com/mysql-workbench-schema-exporter/doctrine2-exporter/blob/a62b13cbf4824c05cc791034ffedf419242ba0cb/lib/MwbExporter/Formatter/Doctrine2/Model/Table.php#L76-L84 |
221,386 | mysql-workbench-schema-exporter/doctrine2-exporter | lib/MwbExporter/Formatter/Doctrine2/Model/Table.php | Table.getModelNameAsFQCN | public function getModelNameAsFQCN($referenceNamespace = null)
{
$namespace = $this->getEntityNamespace();
$fqcn = ($namespace == $referenceNamespace) ? false : true;
return $fqcn ? $namespace.'\\'.$this->getModelName() : $this->getModelName();
} | php | public function getModelNameAsFQCN($referenceNamespace = null)
{
$namespace = $this->getEntityNamespace();
$fqcn = ($namespace == $referenceNamespace) ? false : true;
return $fqcn ? $namespace.'\\'.$this->getModelName() : $this->getModelName();
} | [
"public",
"function",
"getModelNameAsFQCN",
"(",
"$",
"referenceNamespace",
"=",
"null",
")",
"{",
"$",
"namespace",
"=",
"$",
"this",
"->",
"getEntityNamespace",
"(",
")",
";",
"$",
"fqcn",
"=",
"(",
"$",
"namespace",
"==",
"$",
"referenceNamespace",
")",
... | Get Model Name in FQCN format. If reference namespace is suplied and the entity namespace
is equal then relative model name returned instead.
@param string $referenceNamespace The reference namespace
@return string | [
"Get",
"Model",
"Name",
"in",
"FQCN",
"format",
".",
"If",
"reference",
"namespace",
"is",
"suplied",
"and",
"the",
"entity",
"namespace",
"is",
"equal",
"then",
"relative",
"model",
"name",
"returned",
"instead",
"."
] | a62b13cbf4824c05cc791034ffedf419242ba0cb | https://github.com/mysql-workbench-schema-exporter/doctrine2-exporter/blob/a62b13cbf4824c05cc791034ffedf419242ba0cb/lib/MwbExporter/Formatter/Doctrine2/Model/Table.php#L93-L99 |
221,387 | mysql-workbench-schema-exporter/doctrine2-exporter | lib/MwbExporter/Formatter/Doctrine2/Model/Table.php | Table.getLifecycleCallbacks | public function getLifecycleCallbacks()
{
$result = array();
if ($lifecycleCallbacks = trim($this->parseComment('lifecycleCallbacks'))) {
foreach (explode("\n", $lifecycleCallbacks) as $callback) {
list($method, $handler) = explode(':', $callback, 2);
$met... | php | public function getLifecycleCallbacks()
{
$result = array();
if ($lifecycleCallbacks = trim($this->parseComment('lifecycleCallbacks'))) {
foreach (explode("\n", $lifecycleCallbacks) as $callback) {
list($method, $handler) = explode(':', $callback, 2);
$met... | [
"public",
"function",
"getLifecycleCallbacks",
"(",
")",
"{",
"$",
"result",
"=",
"array",
"(",
")",
";",
"if",
"(",
"$",
"lifecycleCallbacks",
"=",
"trim",
"(",
"$",
"this",
"->",
"parseComment",
"(",
"'lifecycleCallbacks'",
")",
")",
")",
"{",
"foreach",... | Get lifecycleCallbacks.
@return array | [
"Get",
"lifecycleCallbacks",
"."
] | a62b13cbf4824c05cc791034ffedf419242ba0cb | https://github.com/mysql-workbench-schema-exporter/doctrine2-exporter/blob/a62b13cbf4824c05cc791034ffedf419242ba0cb/lib/MwbExporter/Formatter/Doctrine2/Model/Table.php#L106-L124 |
221,388 | mysql-workbench-schema-exporter/doctrine2-exporter | lib/MwbExporter/Formatter/Doctrine2/Model/Table.php | Table.getRelatedVarName | public function getRelatedVarName($name, $related = null, $plural = false)
{
/**
* if $name does not match the current ModelName (in case a relation column), check if the table comment includes the `relatedNames` tag
* and parse that to see if for $name was provided a custom value
... | php | public function getRelatedVarName($name, $related = null, $plural = false)
{
/**
* if $name does not match the current ModelName (in case a relation column), check if the table comment includes the `relatedNames` tag
* and parse that to see if for $name was provided a custom value
... | [
"public",
"function",
"getRelatedVarName",
"(",
"$",
"name",
",",
"$",
"related",
"=",
"null",
",",
"$",
"plural",
"=",
"false",
")",
"{",
"/**\n * if $name does not match the current ModelName (in case a relation column), check if the table comment includes the `relatedN... | Get identifier name formatting.
@param string $name Identifier name
@param string $related Related name
@param string $plural Return plural form
@return string | [
"Get",
"identifier",
"name",
"formatting",
"."
] | a62b13cbf4824c05cc791034ffedf419242ba0cb | https://github.com/mysql-workbench-schema-exporter/doctrine2-exporter/blob/a62b13cbf4824c05cc791034ffedf419242ba0cb/lib/MwbExporter/Formatter/Doctrine2/Model/Table.php#L134-L161 |
221,389 | webcreate/vcs | src/Webcreate/Vcs/Svn.php | Svn.add | public function add($path)
{
if (null === $this->wc) {
throw new \RuntimeException('Working copy not initialized, have you tried checkout()?');
}
return $this->wc->add($path);
} | php | public function add($path)
{
if (null === $this->wc) {
throw new \RuntimeException('Working copy not initialized, have you tried checkout()?');
}
return $this->wc->add($path);
} | [
"public",
"function",
"add",
"(",
"$",
"path",
")",
"{",
"if",
"(",
"null",
"===",
"$",
"this",
"->",
"wc",
")",
"{",
"throw",
"new",
"\\",
"RuntimeException",
"(",
"'Working copy not initialized, have you tried checkout()?'",
")",
";",
"}",
"return",
"$",
"... | Add to version control
@param string $path
@throws \RuntimeException
@return string | [
"Add",
"to",
"version",
"control"
] | 31a680f2501c4e5a599e8dd3ffbc8c0a5185c8ad | https://github.com/webcreate/vcs/blob/31a680f2501c4e5a599e8dd3ffbc8c0a5185c8ad/src/Webcreate/Vcs/Svn.php#L55-L62 |
221,390 | headzoo/bitcoin-wallet-api | src/Headzoo/Bitcoin/Wallet/Api/JsonRPC.php | JsonRPC.exec | protected function exec($query)
{
if (!$query) {
throw new Exceptions\RPCException("Empty query.");
}
$url = sprintf("http://%s:%d", $this->conf["host"], $this->conf["port"]);
$web = $this->getWebClient();
$web->setMethod(HttpMethods::POST);
$web-... | php | protected function exec($query)
{
if (!$query) {
throw new Exceptions\RPCException("Empty query.");
}
$url = sprintf("http://%s:%d", $this->conf["host"], $this->conf["port"]);
$web = $this->getWebClient();
$web->setMethod(HttpMethods::POST);
$web-... | [
"protected",
"function",
"exec",
"(",
"$",
"query",
")",
"{",
"if",
"(",
"!",
"$",
"query",
")",
"{",
"throw",
"new",
"Exceptions",
"\\",
"RPCException",
"(",
"\"Empty query.\"",
")",
";",
"}",
"$",
"url",
"=",
"sprintf",
"(",
"\"http://%s:%d\"",
",",
... | Sends the query string to the server and returns the response
@param string $query The query string to send
@return WebResponse
@throws Exceptions\RPCException | [
"Sends",
"the",
"query",
"string",
"to",
"the",
"server",
"and",
"returns",
"the",
"response"
] | f9bbec54be581356f36b5084b50037845a6d00c3 | https://github.com/headzoo/bitcoin-wallet-api/blob/f9bbec54be581356f36b5084b50037845a6d00c3/src/Headzoo/Bitcoin/Wallet/Api/JsonRPC.php#L186-L210 |
221,391 | headzoo/bitcoin-wallet-api | src/Headzoo/Bitcoin/Wallet/Api/JsonRPC.php | JsonRPC.getResponseError | protected function getResponseError(WebResponse $response)
{
$error = [
"message" => "",
"code" => 0
];
$response_text = $response->getBody();
$obj = json_decode($response_text, true);
if (!$obj) {
if (stripos($response_text, "<... | php | protected function getResponseError(WebResponse $response)
{
$error = [
"message" => "",
"code" => 0
];
$response_text = $response->getBody();
$obj = json_decode($response_text, true);
if (!$obj) {
if (stripos($response_text, "<... | [
"protected",
"function",
"getResponseError",
"(",
"WebResponse",
"$",
"response",
")",
"{",
"$",
"error",
"=",
"[",
"\"message\"",
"=>",
"\"\"",
",",
"\"code\"",
"=>",
"0",
"]",
";",
"$",
"response_text",
"=",
"$",
"response",
"->",
"getBody",
"(",
")",
... | Creates an array of error information based on the server response
The Bitcoin api is a real mess. For some errors the server responds with a json encoded string.
For other errors an html string is returned, but the format of the html varies depending on
the error. Some of the html is well formatted, and can be parsed... | [
"Creates",
"an",
"array",
"of",
"error",
"information",
"based",
"on",
"the",
"server",
"response"
] | f9bbec54be581356f36b5084b50037845a6d00c3 | https://github.com/headzoo/bitcoin-wallet-api/blob/f9bbec54be581356f36b5084b50037845a6d00c3/src/Headzoo/Bitcoin/Wallet/Api/JsonRPC.php#L231-L261 |
221,392 | headzoo/bitcoin-wallet-api | src/Headzoo/Bitcoin/Wallet/Api/JsonRPC.php | JsonRPC.getNonceValue | protected function getNonceValue()
{
if (null === $this->nonce) {
$this->nonce = new Nonce();
}
return $this->nonce->generate();
} | php | protected function getNonceValue()
{
if (null === $this->nonce) {
$this->nonce = new Nonce();
}
return $this->nonce->generate();
} | [
"protected",
"function",
"getNonceValue",
"(",
")",
"{",
"if",
"(",
"null",
"===",
"$",
"this",
"->",
"nonce",
")",
"{",
"$",
"this",
"->",
"nonce",
"=",
"new",
"Nonce",
"(",
")",
";",
"}",
"return",
"$",
"this",
"->",
"nonce",
"->",
"generate",
"(... | Generates and returns a nonce value for use as a request id
@return string | [
"Generates",
"and",
"returns",
"a",
"nonce",
"value",
"for",
"use",
"as",
"a",
"request",
"id"
] | f9bbec54be581356f36b5084b50037845a6d00c3 | https://github.com/headzoo/bitcoin-wallet-api/blob/f9bbec54be581356f36b5084b50037845a6d00c3/src/Headzoo/Bitcoin/Wallet/Api/JsonRPC.php#L268-L274 |
221,393 | webcreate/vcs | src/Webcreate/Vcs/Svn/WorkingCopy.php | WorkingCopy.add | public function add($path)
{
if (!file_exists($this->cwd . '/' . $path)) {
throw new NotFoundException(sprintf('Path %s not found', $this->cwd . '/' . $path));
}
$result = $this->status($path);
foreach ($result as $fileInfo) {
if ($fileInfo->getStatus() === ... | php | public function add($path)
{
if (!file_exists($this->cwd . '/' . $path)) {
throw new NotFoundException(sprintf('Path %s not found', $this->cwd . '/' . $path));
}
$result = $this->status($path);
foreach ($result as $fileInfo) {
if ($fileInfo->getStatus() === ... | [
"public",
"function",
"add",
"(",
"$",
"path",
")",
"{",
"if",
"(",
"!",
"file_exists",
"(",
"$",
"this",
"->",
"cwd",
".",
"'/'",
".",
"$",
"path",
")",
")",
"{",
"throw",
"new",
"NotFoundException",
"(",
"sprintf",
"(",
"'Path %s not found'",
",",
... | Add file or directory to Svn
@param string $path
@throws NotFoundException | [
"Add",
"file",
"or",
"directory",
"to",
"Svn"
] | 31a680f2501c4e5a599e8dd3ffbc8c0a5185c8ad | https://github.com/webcreate/vcs/blob/31a680f2501c4e5a599e8dd3ffbc8c0a5185c8ad/src/Webcreate/Vcs/Svn/WorkingCopy.php#L63-L76 |
221,394 | webcreate/vcs | src/Webcreate/Vcs/Svn/WorkingCopy.php | WorkingCopy.status | public function status($path = null)
{
$args = array();
if (null !== $path) {
$args[] = $path;
}
return $this->svn->execute('status', $args, $this->cwd);
} | php | public function status($path = null)
{
$args = array();
if (null !== $path) {
$args[] = $path;
}
return $this->svn->execute('status', $args, $this->cwd);
} | [
"public",
"function",
"status",
"(",
"$",
"path",
"=",
"null",
")",
"{",
"$",
"args",
"=",
"array",
"(",
")",
";",
"if",
"(",
"null",
"!==",
"$",
"path",
")",
"{",
"$",
"args",
"[",
"]",
"=",
"$",
"path",
";",
"}",
"return",
"$",
"this",
"->"... | Get the status of the working copy
@param string $path
@return \Webcreate\Vcs\Common\VcsFileInfo[] | [
"Get",
"the",
"status",
"of",
"the",
"working",
"copy"
] | 31a680f2501c4e5a599e8dd3ffbc8c0a5185c8ad | https://github.com/webcreate/vcs/blob/31a680f2501c4e5a599e8dd3ffbc8c0a5185c8ad/src/Webcreate/Vcs/Svn/WorkingCopy.php#L95-L103 |
221,395 | webcreate/vcs | src/Webcreate/Vcs/Git/Parser/CliParser.php | CliParser.parseLogOutput | public function parseLogOutput($output, array $arguments = array())
{
if (!isset($arguments['--pretty=']) || Git::PRETTY_FORMAT !== $arguments['--pretty=']) {
// non pretty results are not supported
return $output;
}
$xml = '<log>' . $output . '</log>';
$sxm... | php | public function parseLogOutput($output, array $arguments = array())
{
if (!isset($arguments['--pretty=']) || Git::PRETTY_FORMAT !== $arguments['--pretty=']) {
// non pretty results are not supported
return $output;
}
$xml = '<log>' . $output . '</log>';
$sxm... | [
"public",
"function",
"parseLogOutput",
"(",
"$",
"output",
",",
"array",
"$",
"arguments",
"=",
"array",
"(",
")",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"arguments",
"[",
"'--pretty='",
"]",
")",
"||",
"Git",
"::",
"PRETTY_FORMAT",
"!==",
"$",
... | Parses the log command output to Commit objects
@param string $output
@param array $arguments
@return string|\Webcreate\Vcs\Common\Commit[] | [
"Parses",
"the",
"log",
"command",
"output",
"to",
"Commit",
"objects"
] | 31a680f2501c4e5a599e8dd3ffbc8c0a5185c8ad | https://github.com/webcreate/vcs/blob/31a680f2501c4e5a599e8dd3ffbc8c0a5185c8ad/src/Webcreate/Vcs/Git/Parser/CliParser.php#L77-L99 |
221,396 | webcreate/vcs | src/Webcreate/Vcs/Git/Parser/CliParser.php | CliParser.parseStatusOutput | public function parseStatusOutput($output, array $arguments = array())
{
if (!isset($arguments['--porcelain']) || false === $arguments['--porcelain']) {
// non porcelain results are not supported
return $output;
}
if ('' === trim($output)) {
return array(... | php | public function parseStatusOutput($output, array $arguments = array())
{
if (!isset($arguments['--porcelain']) || false === $arguments['--porcelain']) {
// non porcelain results are not supported
return $output;
}
if ('' === trim($output)) {
return array(... | [
"public",
"function",
"parseStatusOutput",
"(",
"$",
"output",
",",
"array",
"$",
"arguments",
"=",
"array",
"(",
")",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"arguments",
"[",
"'--porcelain'",
"]",
")",
"||",
"false",
"===",
"$",
"arguments",
"["... | Parse the status command output to FileInfo objects
@param string $output
@param array $arguments
@throws \Exception
@return string|\Webcreate\Vcs\Common\FileInfo[] | [
"Parse",
"the",
"status",
"command",
"output",
"to",
"FileInfo",
"objects"
] | 31a680f2501c4e5a599e8dd3ffbc8c0a5185c8ad | https://github.com/webcreate/vcs/blob/31a680f2501c4e5a599e8dd3ffbc8c0a5185c8ad/src/Webcreate/Vcs/Git/Parser/CliParser.php#L109-L137 |
221,397 | webcreate/vcs | src/Webcreate/Vcs/Git/Parser/CliParser.php | CliParser.parseDiffOutput | public function parseDiffOutput($output, array $arguments = array())
{
if (!isset($arguments['--name-status']) || false === $arguments['--name-status']) {
// non name-status results are not supported
return $output;
}
$lines = explode("\n", rtrim($output));
... | php | public function parseDiffOutput($output, array $arguments = array())
{
if (!isset($arguments['--name-status']) || false === $arguments['--name-status']) {
// non name-status results are not supported
return $output;
}
$lines = explode("\n", rtrim($output));
... | [
"public",
"function",
"parseDiffOutput",
"(",
"$",
"output",
",",
"array",
"$",
"arguments",
"=",
"array",
"(",
")",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"arguments",
"[",
"'--name-status'",
"]",
")",
"||",
"false",
"===",
"$",
"arguments",
"["... | Parse the diff command output to FileInfo objects
@param string $output
@param array $arguments
@throws \Exception
@return string|\Webcreate\Vcs\Common\VcsFileInfo[] | [
"Parse",
"the",
"diff",
"command",
"output",
"to",
"FileInfo",
"objects"
] | 31a680f2501c4e5a599e8dd3ffbc8c0a5185c8ad | https://github.com/webcreate/vcs/blob/31a680f2501c4e5a599e8dd3ffbc8c0a5185c8ad/src/Webcreate/Vcs/Git/Parser/CliParser.php#L147-L175 |
221,398 | Fritak/messenger-platform | source/WelcomeMessage.php | WelcomeMessage.addNext | public function addNext($text, $template = null)
{
if(!empty($text))
{
$this->callToActions = ['message' => ['text' => $text]];
}
if(!empty($template))
{
if($template instanceof StructuredMessage)
{
$this->callToAct... | php | public function addNext($text, $template = null)
{
if(!empty($text))
{
$this->callToActions = ['message' => ['text' => $text]];
}
if(!empty($template))
{
if($template instanceof StructuredMessage)
{
$this->callToAct... | [
"public",
"function",
"addNext",
"(",
"$",
"text",
",",
"$",
"template",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"empty",
"(",
"$",
"text",
")",
")",
"{",
"$",
"this",
"->",
"callToActions",
"=",
"[",
"'message'",
"=>",
"[",
"'text'",
"=>",
"$",
"... | You can set the welcome message to be text or Structured Message.
@param string $text
@param StructuredMessage $template Structured Message | [
"You",
"can",
"set",
"the",
"welcome",
"message",
"to",
"be",
"text",
"or",
"Structured",
"Message",
"."
] | 689c56636036101240598d55322df974da069a22 | https://github.com/Fritak/messenger-platform/blob/689c56636036101240598d55322df974da069a22/source/WelcomeMessage.php#L28-L46 |
221,399 | mysql-workbench-schema-exporter/doctrine2-exporter | lib/MwbExporter/Formatter/Doctrine2/ZF2InputFilterAnnotation/Model/Table.php | Table.writePopulate | public function writePopulate(WriterInterface $writer)
{
$writer
->write('/**')
->write(' * Populate entity with the given data.')
->write(' * The set* method will be used to set the data.')
->write(' *')
->write(' * @param array $data')
... | php | public function writePopulate(WriterInterface $writer)
{
$writer
->write('/**')
->write(' * Populate entity with the given data.')
->write(' * The set* method will be used to set the data.')
->write(' *')
->write(' * @param array $data')
... | [
"public",
"function",
"writePopulate",
"(",
"WriterInterface",
"$",
"writer",
")",
"{",
"$",
"writer",
"->",
"write",
"(",
"'/**'",
")",
"->",
"write",
"(",
"' * Populate entity with the given data.'",
")",
"->",
"write",
"(",
"' * The set* method will be used to set ... | Write entity populate method.
@see \Zend\Stdlib\Hydrator\ArraySerializable::extract()
@param \MwbExporter\Writer\WriterInterface $writer
@return \MwbExporter\Formatter\Doctrine2\AnnotationZF2InputFilter\Model\Table | [
"Write",
"entity",
"populate",
"method",
"."
] | a62b13cbf4824c05cc791034ffedf419242ba0cb | https://github.com/mysql-workbench-schema-exporter/doctrine2-exporter/blob/a62b13cbf4824c05cc791034ffedf419242ba0cb/lib/MwbExporter/Formatter/Doctrine2/ZF2InputFilterAnnotation/Model/Table.php#L253-L288 |
Subsets and Splits
Yii Code Samples
Gathers all records from test, train, and validation sets that contain the word 'yii', providing a basic filtered view of the dataset relevant to Yii-related content.