_id stringlengths 2 7 | title stringlengths 3 151 | partition stringclasses 3
values | text stringlengths 83 13k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q247200 | Server.clientGetByUid | validation | public function clientGetByUid($uid)
{
foreach ($this->clientList() as $client) {
if ($client["client_unique_identifier"] == $uid) {
return $client;
}
}
throw new Ts3Exception("invalid clientID", 0x200);
} | php | {
"resource": ""
} |
q247201 | Server.clientGetByDbid | validation | public function clientGetByDbid($dbid)
{
foreach ($this->clientList() as $client) {
if ($client["client_database_id"] == $dbid) {
return $client;
}
}
throw new Ts3Exception("invalid clientID", 0x200);
} | php | {
"resource": ""
} |
q247202 | Server.serverGroupGetByName | validation | public function serverGroupGetByName($name, $type = TeamSpeak3::GROUP_DBTYPE_REGULAR)
{
foreach ($this->serverGroupList() as $group) {
if ($group["name"] == $name && $group["type"] == $type) {
return $group;
}
}
throw new Ts3Exception("invalid groupID... | php | {
"resource": ""
} |
q247203 | Server.serverGroupPermList | validation | public function serverGroupPermList($sgid, $permsid = false)
{
return $this->execute(
"servergrouppermlist",
array("sgid" => $sgid, $permsid ? "-permsid" : null)
)->toAssocArray($permsid ? "permsid" : "permid");
} | php | {
"resource": ""
} |
q247204 | Server.serverGroupGetProfiles | validation | public function serverGroupGetProfiles()
{
$profiles = array();
foreach ($this->serverGroupList() as $sgid => $sgroup) {
if ($sgroup["type"] != TeamSpeak3::GROUP_DBTYPE_REGULAR) {
continue;
}
$profiles[$sgid] = array(
"b_permissio... | php | {
"resource": ""
} |
q247205 | Server.channelGroupGetById | validation | public function channelGroupGetById($cgid)
{
if (!array_key_exists((string)$cgid, $this->channelGroupList())) {
throw new Ts3Exception("invalid groupID", 0xA00);
}
return $this->cgroupList[intval((string)$cgid)];
} | php | {
"resource": ""
} |
q247206 | Server.channelGroupPermList | validation | public function channelGroupPermList($cgid, $permsid = false)
{
return $this->execute(
"channelgrouppermlist",
array("cgid" => $cgid, $permsid ? "-permsid" : null)
)->toAssocArray($permsid ? "permsid" : "permid");
} | php | {
"resource": ""
} |
q247207 | Server.permReset | validation | public function permReset()
{
$token = $this->request("permreset")->toList();
Signal::getInstance()->emit("notifyTokencreated", $this, $token["token"]);
return $token["token"];
} | php | {
"resource": ""
} |
q247208 | Server.tempPasswordList | validation | public function tempPasswordList($resolve = false)
{
$passwords = $this->request("servertemppasswordlist")->toAssocArray("pw_clear");
if ($resolve) {
foreach ($passwords as $password => $array) {
try {
$channel = $this->channelGetById($array["tcid"]);... | php | {
"resource": ""
} |
q247209 | Server.sortGroupList | validation | protected static function sortGroupList(AbstractNode $a, AbstractNode $b)
{
if (get_class($a) != get_class($b)) {
return 0;
/* workaround for PHP bug #50688 */
throw new Ts3Exception("invalid parameter", 0x602);
}
if (!$a instanceof Servergroup && !$a in... | php | {
"resource": ""
} |
q247210 | Server.sortFileList | validation | protected static function sortFileList(array $a, array $b)
{
if (!array_key_exists("src", $a) || !array_key_exists("src", $b) || !array_key_exists(
"type",
$a
) || !array_key_exists("type", $b)
) {
return 0;
throw new Ts3Exception(... | php | {
"resource": ""
} |
q247211 | QBankApi.accounts | validation | public function accounts()
{
if (!$this->accounts instanceof AccountsController) {
$this->accounts = new AccountsController($this->getClient(), $this->cachePolicy, $this->cache);
$this->accounts->setLogger($this->logger);
}
return $this->accounts;
} | php | {
"resource": ""
} |
q247212 | QBankApi.categories | validation | public function categories()
{
if (!$this->categories instanceof CategoriesController) {
$this->categories = new CategoriesController($this->getClient(), $this->cachePolicy, $this->cache);
$this->categories->setLogger($this->logger);
}
return $this->categories;
} | php | {
"resource": ""
} |
q247213 | QBankApi.deployment | validation | public function deployment()
{
if (!$this->deployment instanceof DeploymentController) {
$this->deployment = new DeploymentController($this->getClient(), $this->cachePolicy, $this->cache);
$this->deployment->setLogger($this->logger);
}
return $this->deployment;
} | php | {
"resource": ""
} |
q247214 | QBankApi.events | validation | public function events()
{
if (!$this->events instanceof EventsController) {
$this->events = new EventsController($this->getClient(), $this->cachePolicy, $this->cache);
$this->events->setLogger($this->logger);
}
return $this->events;
} | php | {
"resource": ""
} |
q247215 | QBankApi.filters | validation | public function filters()
{
if (!$this->filters instanceof FiltersController) {
$this->filters = new FiltersController($this->getClient(), $this->cachePolicy, $this->cache);
$this->filters->setLogger($this->logger);
}
return $this->filters;
} | php | {
"resource": ""
} |
q247216 | QBankApi.folders | validation | public function folders()
{
if (!$this->folders instanceof FoldersController) {
$this->folders = new FoldersController($this->getClient(), $this->cachePolicy, $this->cache);
$this->folders->setLogger($this->logger);
}
return $this->folders;
} | php | {
"resource": ""
} |
q247217 | QBankApi.media | validation | public function media()
{
if (!$this->media instanceof MediaController) {
$this->media = new MediaController($this->getClient(), $this->cachePolicy, $this->cache);
$this->media->setLogger($this->logger);
}
return $this->media;
} | php | {
"resource": ""
} |
q247218 | QBankApi.moodboards | validation | public function moodboards()
{
if (!$this->moodboards instanceof MoodboardsController) {
$this->moodboards = new MoodboardsController($this->getClient(), $this->cachePolicy, $this->cache);
$this->moodboards->setLogger($this->logger);
}
return $this->moodboards;
} | php | {
"resource": ""
} |
q247219 | QBankApi.objecttypes | validation | public function objecttypes()
{
if (!$this->objecttypes instanceof ObjecttypesController) {
$this->objecttypes = new ObjecttypesController($this->getClient(), $this->cachePolicy, $this->cache);
$this->objecttypes->setLogger($this->logger);
}
return $this->objecttypes... | php | {
"resource": ""
} |
q247220 | QBankApi.propertysets | validation | public function propertysets()
{
if (!$this->propertysets instanceof PropertysetsController) {
$this->propertysets = new PropertysetsController($this->getClient(), $this->cachePolicy, $this->cache);
$this->propertysets->setLogger($this->logger);
}
return $this->prope... | php | {
"resource": ""
} |
q247221 | QBankApi.socialmedia | validation | public function socialmedia()
{
if (!$this->socialmedia instanceof SocialmediaController) {
$this->socialmedia = new SocialmediaController($this->getClient(), $this->cachePolicy, $this->cache);
$this->socialmedia->setLogger($this->logger);
}
return $this->socialmedia... | php | {
"resource": ""
} |
q247222 | QBankApi.buildBasepath | validation | protected function buildBasepath($url)
{
if (!preg_match('#(\w+:)?//#', $url)) {
$url = '//' . $url;
}
$urlParts = parse_url($url);
if (false === $urlParts) {
throw new \InvalidArgumentException('Could not parse QBank URL.');
}
// Default to... | php | {
"resource": ""
} |
q247223 | QBankApi.getClient | validation | protected function getClient()
{
if (!($this->client instanceof Client)) {
$handlerStack = HandlerStack::create();
$handlerStack = $this->withOAuth2MiddleWare($handlerStack);
$this->client = new Client([
'handler' => $handlerStack,
'auth' =... | php | {
"resource": ""
} |
q247224 | QBankApi.withOAuth2MiddleWare | validation | protected function withOAuth2MiddleWare(HandlerStack $stack)
{
if (!($this->oauth2Middleware instanceof OAuthMiddleware)) {
$oauthClient = new Client([
'base_uri' => $this->basepath,
'verify' => $this->verifyCertificates,
'headers' => [
... | php | {
"resource": ""
} |
q247225 | QBankApi.updateCredentials | validation | public function updateCredentials($user, $password)
{
$oldUser = $this->credentials->getUsername();
$this->credentials = new Credentials($this->credentials->getClientId(), $user, $password);
unset($password);
if ($this->client instanceof Client) {
$this->client = $this->o... | php | {
"resource": ""
} |
q247226 | QBankApi.setTokens | validation | public function setTokens(AccessToken $accessToken, AccessToken $refreshToken = null)
{
if ($accessToken instanceof AccessToken && false === $accessToken->isExpired()) {
if ($this->cache instanceof Cache) {
$this->cache->save(
'oauth2accesstoken',
... | php | {
"resource": ""
} |
q247227 | QBankApi.getTokens | validation | public function getTokens()
{
$tokens = ['accessToken' => null, 'refreshToken' => null];
if ($this->oauth2Middleware instanceof OAuthMiddleware) {
$tokens['accessToken'] = $this->oauth2Middleware->getAccessToken();
$tokens['refreshToken'] = $this->oauth2Middleware->getRefresh... | php | {
"resource": ""
} |
q247228 | Search.setCreatedRange | validation | public function setCreatedRange($createdRange)
{
if ($createdRange instanceof DateTimeRange) {
$this->createdRange = $createdRange;
} elseif (is_array($createdRange)) {
$this->createdRange = new DateTimeRange($createdRange);
} else {
$this->createdRange = ... | php | {
"resource": ""
} |
q247229 | Search.setUpdatedRange | validation | public function setUpdatedRange($updatedRange)
{
if ($updatedRange instanceof DateTimeRange) {
$this->updatedRange = $updatedRange;
} elseif (is_array($updatedRange)) {
$this->updatedRange = new DateTimeRange($updatedRange);
} else {
$this->updatedRange = ... | php | {
"resource": ""
} |
q247230 | Search.setProperties | validation | public function setProperties(array $properties)
{
$this->properties = [];
foreach ($properties as $item) {
$this->addPropertyCriteria($item);
}
return $this;
} | php | {
"resource": ""
} |
q247231 | Search.addPropertyCriteria | validation | public function addPropertyCriteria($item)
{
if (!($item instanceof PropertyCriteria)) {
if (is_array($item)) {
try {
$item = new PropertyCriteria($item);
} catch (\Exception $e) {
trigger_error('Could not auto-instantiate P... | php | {
"resource": ""
} |
q247232 | Search.setDeploymentDateRange | validation | public function setDeploymentDateRange($deploymentDateRange)
{
if ($deploymentDateRange instanceof DateTimeRange) {
$this->deploymentDateRange = $deploymentDateRange;
} elseif (is_array($deploymentDateRange)) {
$this->deploymentDateRange = new DateTimeRange($deploymentDateRan... | php | {
"resource": ""
} |
q247233 | Search.setSortFields | validation | public function setSortFields(array $sortFields)
{
$this->sortFields = [];
foreach ($sortFields as $item) {
$this->addSearchSort($item);
}
return $this;
} | php | {
"resource": ""
} |
q247234 | Search.addSearchSort | validation | public function addSearchSort($item)
{
if (!($item instanceof SearchSort)) {
if (is_array($item)) {
try {
$item = new SearchSort($item);
} catch (\Exception $e) {
trigger_error('Could not auto-instantiate SearchSort. ' . $e-... | php | {
"resource": ""
} |
q247235 | FolderResponse.setSubFolders | validation | public function setSubFolders(array $subFolders)
{
$this->subFolders = [];
foreach ($subFolders as $item) {
$this->addFolderResponse($item);
}
return $this;
} | php | {
"resource": ""
} |
q247236 | FolderResponse.addFolderResponse | validation | public function addFolderResponse($item)
{
if (!($item instanceof self)) {
if (is_array($item)) {
try {
$item = new self($item);
} catch (\Exception $e) {
trigger_error('Could not auto-instantiate FolderResponse. ' . $e->get... | php | {
"resource": ""
} |
q247237 | FolderResponse.setSavedSearch | validation | public function setSavedSearch($savedSearch)
{
if ($savedSearch instanceof SavedSearch) {
$this->savedSearch = $savedSearch;
} elseif (is_array($savedSearch)) {
$this->savedSearch = new SavedSearch($savedSearch);
} else {
$this->savedSearch = null;
... | php | {
"resource": ""
} |
q247238 | DateTimeRange.setMin | validation | public function setMin($min)
{
if ($min instanceof DateTime) {
$this->min = $min;
} else {
try {
$this->min = new DateTime($min);
} catch (\Exception $e) {
$this->min = null;
}
}
return $this;
} | php | {
"resource": ""
} |
q247239 | DateTimeRange.setMax | validation | public function setMax($max)
{
if ($max instanceof DateTime) {
$this->max = $max;
} else {
try {
$this->max = new DateTime($max);
} catch (\Exception $e) {
$this->max = null;
}
}
return $this;
} | php | {
"resource": ""
} |
q247240 | DeploymentSite.setProtocol | validation | public function setProtocol($protocol)
{
if ($protocol instanceof Protocol) {
$this->protocol = $protocol;
} elseif (is_array($protocol)) {
$this->protocol = new Protocol($protocol);
} else {
$this->protocol = null;
trigger_error('Argument must... | php | {
"resource": ""
} |
q247241 | DeploymentSite.setImagetemplates | validation | public function setImagetemplates(array $imagetemplates)
{
$this->imagetemplates = [];
foreach ($imagetemplates as $item) {
$this->addImageTemplate($item);
}
return $this;
} | php | {
"resource": ""
} |
q247242 | DeploymentSite.addImageTemplate | validation | public function addImageTemplate($item)
{
if (!($item instanceof ImageTemplate)) {
if (is_array($item)) {
try {
$item = new ImageTemplate($item);
} catch (\Exception $e) {
trigger_error('Could not auto-instantiate ImageTempl... | php | {
"resource": ""
} |
q247243 | DeploymentSite.setVideotemplates | validation | public function setVideotemplates(array $videotemplates)
{
$this->videotemplates = [];
foreach ($videotemplates as $item) {
$this->addVideoTemplate($item);
}
return $this;
} | php | {
"resource": ""
} |
q247244 | DeploymentSite.addVideoTemplate | validation | public function addVideoTemplate($item)
{
if (!($item instanceof VideoTemplate)) {
if (is_array($item)) {
try {
$item = new VideoTemplate($item);
} catch (\Exception $e) {
trigger_error('Could not auto-instantiate VideoTempl... | php | {
"resource": ""
} |
q247245 | DeploymentSite.setCategories | validation | public function setCategories(array $categories)
{
$this->categories = [];
foreach ($categories as $item) {
$this->addCategoryResponse($item);
}
return $this;
} | php | {
"resource": ""
} |
q247246 | DeploymentSite.addCategoryResponse | validation | public function addCategoryResponse($item)
{
if (!($item instanceof CategoryResponse)) {
if (is_array($item)) {
try {
$item = new CategoryResponse($item);
} catch (\Exception $e) {
trigger_error('Could not auto-instantiate C... | php | {
"resource": ""
} |
q247247 | Char.toUnicode | validation | public function toUnicode()
{
$h = ord($this->char{0});
if ($h <= 0x7F) {
return $h;
} else {
if ($h < 0xC2) {
return false;
} else {
if ($h <= 0xDF) {
return ($h & 0x1F) << 6 | (ord($this->char{1}) & 0x... | php | {
"resource": ""
} |
q247248 | Char.fromHex | validation | public static function fromHex($hex)
{
if (strlen($hex) != 2) {
throw new Ts3Exception("given parameter '" . $hex . "' is not a valid hexadecimal number");
}
return new self(chr(hexdec($hex)));
} | php | {
"resource": ""
} |
q247249 | FileTransfer.init | validation | protected function init($ftkey)
{
if (strlen($ftkey) != 32) {
throw new Ts3Exception("invalid file transfer key format");
}
$this->getProfiler()->start();
$this->getTransport()->send($ftkey);
Signal::getInstance()->emit("filetransferHandshake", $this);
} | php | {
"resource": ""
} |
q247250 | MediaUsageResponse.setDeleted | validation | public function setDeleted($deleted)
{
if ($deleted instanceof DateTime) {
$this->deleted = $deleted;
} else {
try {
$this->deleted = new DateTime($deleted);
} catch (\Exception $e) {
$this->deleted = null;
}
}
... | php | {
"resource": ""
} |
q247251 | SearchSort.setDateRange | validation | public function setDateRange($dateRange)
{
if ($dateRange instanceof DateTimeRange) {
$this->dateRange = $dateRange;
} elseif (is_array($dateRange)) {
$this->dateRange = new DateTimeRange($dateRange);
} else {
$this->dateRange = null;
trigger_e... | php | {
"resource": ""
} |
q247252 | CommentResponse.setReplies | validation | public function setReplies(array $replies)
{
$this->replies = [];
foreach ($replies as $item) {
$this->addCommentResponse($item);
}
return $this;
} | php | {
"resource": ""
} |
q247253 | CommentResponse.addCommentResponse | validation | public function addCommentResponse($item)
{
if (!($item instanceof self)) {
if (is_array($item)) {
try {
$item = new self($item);
} catch (\Exception $e) {
trigger_error('Could not auto-instantiate CommentResponse. ' . $e->g... | php | {
"resource": ""
} |
q247254 | DeploymentController.listProtocols | validation | public function listProtocols(CachePolicy $cachePolicy = null)
{
$parameters = [
'query' => [],
'body' => json_encode([], JSON_UNESCAPED_UNICODE),
'headers' => [],
];
$result = $this->get('v1/deployment/protocols', $parameters, $cachePolicy);
fore... | php | {
"resource": ""
} |
q247255 | DeploymentController.retrieveProtocol | validation | public function retrieveProtocol($id, CachePolicy $cachePolicy = null)
{
$parameters = [
'query' => [],
'body' => json_encode([], JSON_UNESCAPED_UNICODE),
'headers' => [],
];
$result = $this->get('v1/deployment/protocols/' . $id . '', $parameters, $cacheP... | php | {
"resource": ""
} |
q247256 | DeploymentController.retrieveSite | validation | public function retrieveSite($id, CachePolicy $cachePolicy = null)
{
$parameters = [
'query' => [],
'body' => json_encode([], JSON_UNESCAPED_UNICODE),
'headers' => [],
];
$result = $this->get('v1/deployment/sites/' . $id . '', $parameters, $cachePolicy);
... | php | {
"resource": ""
} |
q247257 | DeploymentController.createSite | validation | public function createSite(DeploymentSite $deploymentSite)
{
$parameters = [
'query' => [],
'body' => json_encode(['deploymentSite' => $deploymentSite], JSON_UNESCAPED_UNICODE),
'headers' => [],
];
$result = $this->post('v1/deployment', $parameters);
... | php | {
"resource": ""
} |
q247258 | DeploymentController.updateSite | validation | public function updateSite($id, DeploymentSite $deploymentSite)
{
$parameters = [
'query' => [],
'body' => json_encode(['deploymentSite' => $deploymentSite], JSON_UNESCAPED_UNICODE),
'headers' => [],
];
$result = $this->post('v1/deployment/' . $id . '', $... | php | {
"resource": ""
} |
q247259 | DeploymentController.addMediaToDeploymentSite | validation | public function addMediaToDeploymentSite($id, array $mediaIds)
{
$parameters = [
'query' => [],
'body' => json_encode(['mediaIds' => $mediaIds], JSON_UNESCAPED_UNICODE),
'headers' => [],
];
$result = $this->post('v1/deployment/' . $id . '/media', $paramet... | php | {
"resource": ""
} |
q247260 | DeploymentController.removeSite | validation | public function removeSite($id)
{
$parameters = [
'query' => [],
'body' => json_encode([], JSON_UNESCAPED_UNICODE),
'headers' => [],
];
$result = $this->delete('v1/deployment/' . $id . '', $parameters);
$result = new DeploymentSiteResponse($result... | php | {
"resource": ""
} |
q247261 | DeploymentController.removeMediaFromDeploymentSite | validation | public function removeMediaFromDeploymentSite($id, $mediaIds)
{
$parameters = [
'query' => ['mediaIds' => $mediaIds],
'body' => json_encode([], JSON_UNESCAPED_UNICODE),
'headers' => [],
];
$result = $this->delete('v1/deployment/' . $id . '/media', $parame... | php | {
"resource": ""
} |
q247262 | MailChimp.setApiKey | validation | public function setApiKey($apiKey)
{
$this->apiKey = $apiKey;
list(, $datacentre) = explode('-', $this->apiKey);
$this->apiUrl = str_replace('<dc>', $datacentre, $this->apiUrl);
} | php | {
"resource": ""
} |
q247263 | MailChimp.request | validation | public function request($endPoint, $httpVerb = 'GET', $data = array())
{
// Validate API
if (!$this->apiKey) {
throw new \Exception('MailChimp API Key must be set before making request!');
}
$endPoint = ltrim($endPoint, '/');
$httpVerb = strtoupper($httpV... | php | {
"resource": ""
} |
q247264 | MailChimp.curlRequest | validation | private function curlRequest($url, $httpVerb, array $data = array(), $curlTimeout = 15)
{
if (function_exists('curl_init') && function_exists('curl_setopt')) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type... | php | {
"resource": ""
} |
q247265 | MediaResponse.setMetadata | validation | public function setMetadata(array $metadata)
{
$this->metadata = [];
foreach ($metadata as $item) {
$this->addMetaData($item);
}
return $this;
} | php | {
"resource": ""
} |
q247266 | MediaResponse.addMetaData | validation | public function addMetaData($item)
{
if (!($item instanceof MetaData)) {
if (is_array($item)) {
try {
$item = new MetaData($item);
} catch (\Exception $e) {
trigger_error('Could not auto-instantiate MetaData. ' . $e->getMess... | php | {
"resource": ""
} |
q247267 | MediaResponse.setMimetype | validation | public function setMimetype($mimetype)
{
if ($mimetype instanceof MimeType) {
$this->mimetype = $mimetype;
} elseif (is_array($mimetype)) {
$this->mimetype = new MimeType($mimetype);
} else {
$this->mimetype = null;
trigger_error('Argument must... | php | {
"resource": ""
} |
q247268 | MediaResponse.setUploaded | validation | public function setUploaded($uploaded)
{
if ($uploaded instanceof DateTime) {
$this->uploaded = $uploaded;
} else {
try {
$this->uploaded = new DateTime($uploaded);
} catch (\Exception $e) {
$this->uploaded = null;
}
... | php | {
"resource": ""
} |
q247269 | MediaResponse.setDeployedFiles | validation | public function setDeployedFiles(array $deployedFiles)
{
$this->deployedFiles = [];
foreach ($deployedFiles as $item) {
$this->addDeploymentFile($item);
}
return $this;
} | php | {
"resource": ""
} |
q247270 | MediaResponse.addDeploymentFile | validation | public function addDeploymentFile($item)
{
if (!($item instanceof DeploymentFile)) {
if (is_array($item)) {
try {
$item = new DeploymentFile($item);
} catch (\Exception $e) {
trigger_error('Could not auto-instantiate Deploym... | php | {
"resource": ""
} |
q247271 | MediaResponse.setChildMedias | validation | public function setChildMedias(array $childMedias)
{
$this->childMedias = [];
foreach ($childMedias as $item) {
$this->addself($item);
}
return $this;
} | php | {
"resource": ""
} |
q247272 | MediaResponse.addself | validation | public function addself($item)
{
if (!($item instanceof self)) {
if (is_array($item)) {
try {
$item = new self($item);
} catch (\Exception $e) {
trigger_error('Could not auto-instantiate self. ' . $e->getMessage(), E_USER_WA... | php | {
"resource": ""
} |
q247273 | MediaResponse.getDeployedFile | validation | public function getDeployedFile($templateId, $templateType = self::TEMPLATE_IMAGE, $siteId = null)
{
foreach ($this->deployedFiles as $deployedFile) {
/** @var DeploymentFile $deployedFile */
if (null === $siteId || $siteId == $deployedFile->getDeployMentSiteId()) {
i... | php | {
"resource": ""
} |
q247274 | MediaResponse.getMetadata | validation | public function getMetadata($section = null, $key = null)
{
if (null === $section) {
return $this->metadata;
}
foreach ($this->metadata as $md) {
/** @var MetaData $md */
if ($section != $md->getSection()) {
continue;
}
... | php | {
"resource": ""
} |
q247275 | ImageTemplate.setMimeType | validation | public function setMimeType($mimeType)
{
if ($mimeType instanceof MimeType) {
$this->mimeType = $mimeType;
} elseif (is_array($mimeType)) {
$this->mimeType = new MimeType($mimeType);
} else {
$this->mimeType = null;
trigger_error('Argument must... | php | {
"resource": ""
} |
q247276 | ImageTemplate.setCommands | validation | public function setCommands(array $commands)
{
$this->commands = [];
foreach ($commands as $item) {
$this->addCommand($item);
}
return $this;
} | php | {
"resource": ""
} |
q247277 | ImageTemplate.addCommand | validation | public function addCommand($item)
{
if (!($item instanceof Command)) {
if (is_array($item)) {
try {
$item = new Command($item);
} catch (\Exception $e) {
trigger_error('Could not auto-instantiate Command. ' . $e->getMessage(... | php | {
"resource": ""
} |
q247278 | Multiselect.init | validation | public function init(){
parent::init();
//$this->options = array_merge($this->options,['readonly'=>'true']);
if($this->data){
$order = 0;
if(is_array($this->model->{$this->attribute})){
//echo '<pre>';
//print_r($this->model->{$this... | php | {
"resource": ""
} |
q247279 | AbstractAdapter.initTransport | validation | protected function initTransport($options, $transport = "TCP")
{
if (!is_array($options)) {
throw new Ts3Exception("transport parameters must provided in an array");
}
if($transport == "TCP")
$this->transport = new TCP($options);
else
$this->transp... | php | {
"resource": ""
} |
q247280 | EventsController.custom | validation | public function custom($sessionId, $mediaId, $event)
{
$parameters = [
'query' => [],
'body' => json_encode(['sessionId' => $sessionId, 'mediaId' => $mediaId, 'event' => $event], JSON_UNESCAPED_UNICODE),
'headers' => [],
];
$result = $this->post('v1/event... | php | {
"resource": ""
} |
q247281 | EventsController.download | validation | public function download($sessionId, array $downloads)
{
$parameters = [
'query' => [],
'body' => json_encode(['sessionId' => $sessionId, 'downloads' => $downloads], JSON_UNESCAPED_UNICODE),
'headers' => [],
];
$result = $this->post('v1/events/download', ... | php | {
"resource": ""
} |
q247282 | EventsController.search | validation | public function search($sessionId, Search $search, $hits)
{
$parameters = [
'query' => [],
'body' => json_encode(['sessionId' => $sessionId, 'search' => $search, 'hits' => $hits], JSON_UNESCAPED_UNICODE),
'headers' => [],
];
$result = $this->post('v1/even... | php | {
"resource": ""
} |
q247283 | EventsController.session | validation | public function session($sourceId, $sessionHash, $remoteIp, $userAgent, $userId = null)
{
$parameters = [
'query' => [],
'body' => json_encode(['sourceId' => $sourceId, 'sessionHash' => $sessionHash, 'remoteIp' => $remoteIp, 'userAgent' => $userAgent, 'userId' => $userId], JSON_UNESC... | php | {
"resource": ""
} |
q247284 | EventsController.addUsage | validation | public function addUsage($sessionId, MediaUsage $mediaUsage)
{
$parameters = [
'query' => [],
'body' => json_encode(['sessionId' => $sessionId, 'mediaUsage' => $mediaUsage], JSON_UNESCAPED_UNICODE),
'headers' => [],
];
$result = $this->post('v1/events/usa... | php | {
"resource": ""
} |
q247285 | EventsController.view | validation | public function view($sessionId, $mediaId)
{
$parameters = [
'query' => [],
'body' => json_encode(['sessionId' => $sessionId, 'mediaId' => $mediaId], JSON_UNESCAPED_UNICODE),
'headers' => [],
];
$result = $this->post('v1/events/view', $parameters, true);
... | php | {
"resource": ""
} |
q247286 | Dropdown.renderItems | validation | protected function renderItems($items)
{
$lines = [];
foreach ($items as $i => $item) {
if (isset($item['visible']) && !$item['visible']) {
unset($items[$i]);
continue;
}
if (is_string($item)) {
$lines[] = $item;
... | php | {
"resource": ""
} |
q247287 | Widget.registerPlugin | validation | protected function registerPlugin($name)
{
$view = $this->getView();
AdminUiAsset::register($view);
$id = $this->options['id'];
if ($this->clientOptions !== false) {
$options = empty($this->clientOptions) ? '' : Json::encode($this->clientOptions);
$... | php | {
"resource": ""
} |
q247288 | ObjecttypesController.listObjectTypes | validation | public function listObjectTypes(CachePolicy $cachePolicy = null)
{
$parameters = [
'query' => [],
'body' => json_encode([], JSON_UNESCAPED_UNICODE),
'headers' => [],
];
$result = $this->get('v1/objecttypes', $parameters, $cachePolicy);
foreach ($r... | php | {
"resource": ""
} |
q247289 | ObjecttypesController.retrieveObjectType | validation | public function retrieveObjectType($id, CachePolicy $cachePolicy = null)
{
$parameters = [
'query' => [],
'body' => json_encode([], JSON_UNESCAPED_UNICODE),
'headers' => [],
];
$result = $this->get('v1/objecttypes/' . $id . '', $parameters, $cachePolicy);... | php | {
"resource": ""
} |
q247290 | PropertySet.setProperties | validation | public function setProperties(array $properties)
{
$this->properties = [];
foreach ($properties as $item) {
$this->addPropertyResponse($item);
}
return $this;
} | php | {
"resource": ""
} |
q247291 | PropertySet.addPropertyResponse | validation | public function addPropertyResponse($item)
{
if (!($item instanceof PropertyResponse)) {
if (is_array($item)) {
try {
$item = new PropertyResponse($item);
} catch (\Exception $e) {
trigger_error('Could not auto-instantiate P... | php | {
"resource": ""
} |
q247292 | FoldersController.listFolders | validation | public function listFolders($root = 0, $depth = 0, $includeProperties = true, $includeObjectCounts = false, CachePolicy $cachePolicy = null)
{
$parameters = [
'query' => ['root' => $root, 'depth' => $depth, 'includeProperties' => $includeProperties, 'includeObjectCounts' => $includeObjectCounts]... | php | {
"resource": ""
} |
q247293 | FoldersController.retrieveFolder | validation | public function retrieveFolder($id, $depth = 0, $includeProperties = true, $includeObjectCounts = false, CachePolicy $cachePolicy = null)
{
$parameters = [
'query' => ['depth' => $depth, 'includeProperties' => $includeProperties, 'includeObjectCounts' => $includeObjectCounts],
'body'... | php | {
"resource": ""
} |
q247294 | FoldersController.retrieveParents | validation | public function retrieveParents($id, CachePolicy $cachePolicy = null)
{
$parameters = [
'query' => [],
'body' => json_encode([], JSON_UNESCAPED_UNICODE),
'headers' => [],
];
$result = $this->get('v1/folders/' . $id . '/parents', $parameters, $cachePolicy)... | php | {
"resource": ""
} |
q247295 | FoldersController.createFolder | validation | public function createFolder(Folder $folder, $parentId = 0, $inheritAccess = null)
{
$parameters = [
'query' => ['parentId' => $parentId],
'body' => json_encode(['folder' => $folder, 'inheritAccess' => $inheritAccess], JSON_UNESCAPED_UNICODE),
'headers' => [],
];
... | php | {
"resource": ""
} |
q247296 | FoldersController.addMediaToFolder | validation | public function addMediaToFolder($folderId, array $mediaIds)
{
$parameters = [
'query' => [],
'body' => json_encode(['mediaIds' => $mediaIds], JSON_UNESCAPED_UNICODE),
'headers' => [],
];
$result = $this->post('v1/folders/' . $folderId . '/media', $parame... | php | {
"resource": ""
} |
q247297 | FoldersController.updateFolder | validation | public function updateFolder($id, Folder $folder)
{
$parameters = [
'query' => [],
'body' => json_encode(['folder' => $folder], JSON_UNESCAPED_UNICODE),
'headers' => [],
];
$result = $this->post('v1/folders/' . $id . '', $parameters);
$result = ne... | php | {
"resource": ""
} |
q247298 | FoldersController.removeMediaFromFolder | validation | public function removeMediaFromFolder($folderId, $mediaId)
{
$parameters = [
'query' => [],
'body' => json_encode([], JSON_UNESCAPED_UNICODE),
'headers' => [],
];
$result = $this->delete('v1/folders/' . $folderId . '/media/' . $mediaId . '', $parameters);... | php | {
"resource": ""
} |
q247299 | FoldersController.removeFolder | validation | public function removeFolder($id)
{
$parameters = [
'query' => [],
'body' => json_encode([], JSON_UNESCAPED_UNICODE),
'headers' => [],
];
$result = $this->delete('v1/folders/' . $id . '', $parameters);
$result = new FolderResponse($result);
... | php | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.