_id stringlengths 2 7 | title stringlengths 3 151 | partition stringclasses 3
values | text stringlengths 83 13k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q247100 | ImageResizer.getAllDirectories | validation | public function getAllDirectories()
{
$directories = [];
foreach ($this->rulesets as $ruleset) {
$dirs = GeneralUtility::trimExplode(',', $ruleset['directories_config'], true);
$directories = array_merge($directories, $dirs);
}
$directories = array_unique($dir... | php | {
"resource": ""
} |
q247101 | ImageResizer.getAllFileTypes | validation | public function getAllFileTypes()
{
$fileTypes = [];
foreach ($this->rulesets as $ruleset) {
if (is_array($ruleset['file_types'])) {
$fileTypes = array_merge($fileTypes, $ruleset['file_types']);
}
}
$fileTypes = array_unique($fileTypes);
... | php | {
"resource": ""
} |
q247102 | ImageResizer.compileRulesets | validation | protected function compileRulesets(array $rulesets)
{
$out = [];
$elements = $rulesets['data']['sDEF']['lDEF']['ruleset']['el'];
foreach ($elements as $container) {
if (isset($container['container']['el'])) {
$values = [];
foreach ($container['con... | php | {
"resource": ""
} |
q247103 | ImageResizer.expandValuesInRuleset | validation | protected function expandValuesInRuleset(array $ruleset)
{
$values = [];
foreach ($ruleset as $key => $value) {
switch ($key) {
case 'usergroup':
$value = GeneralUtility::trimExplode(',', $value, true);
break;
case '... | php | {
"resource": ""
} |
q247104 | ImageResizer.expandConversionMapping | validation | protected function expandConversionMapping(array $mapping)
{
$ret = [];
$matches = [];
foreach ($mapping as $m) {
if (preg_match('/^(.*)\s*=>\s*(.*)/', $m, $matches)) {
$ret[trim($matches[1])] = trim($matches[2]);
}
}
return $ret;
} | php | {
"resource": ""
} |
q247105 | ImageResizer.getDirectoryPattern | validation | public function getDirectoryPattern($directory)
{
$pattern = '/^' . str_replace('/', '\\/', $directory) . '/';
$pattern = str_replace('\\/**\\/', '\\/([^\/]+\\/)*', $pattern);
$pattern = str_replace('\\/*\\/', '\\/[^\/]+\\/', $pattern);
return $pattern;
} | php | {
"resource": ""
} |
q247106 | ImageResizer.reportAdditionalStorageClaimed | validation | protected function reportAdditionalStorageClaimed($bytes)
{
$legacyFileName = PATH_site . 'typo3conf/.tx_imageautoresize';
$fileName = PATH_site . 'typo3temp/.tx_imageautoresize';
// Note: transfer of legacy filename should be removed after some time
if (file_exists($legacyFileName)... | php | {
"resource": ""
} |
q247107 | ImageResizer.getIndexer | validation | protected function getIndexer(\TYPO3\CMS\Core\Resource\ResourceStorage $storage)
{
return GeneralUtility::makeInstance(Indexer::class, $storage);
} | php | {
"resource": ""
} |
q247108 | ImageUtility.getOrientation | validation | public static function getOrientation($fileName)
{
$orientation = 1; // Fallback to "straight"
$metadata = static::getMetadata($fileName);
if (isset($metadata['Orientation'])) {
$orientation = $metadata['Orientation'];
}
return $orientation;
} | php | {
"resource": ""
} |
q247109 | ImageUtility.getMetadata | validation | public static function getMetadata($fileName, $fullExtract = false)
{
$metadata = static::getBasicMetadata($fileName);
if ($fullExtract && !empty($metadata)) {
$virtualFileObject = static::getVirtualFileObject($fileName, $metadata);
$extractorRegistry = \TYPO3\CMS\Core\Resou... | php | {
"resource": ""
} |
q247110 | ImageUtility.getVirtualFileObject | validation | protected static function getVirtualFileObject($fileName, array $metadata)
{
/** @var \TYPO3\CMS\Core\Resource\ResourceFactory $resourceFactory */
$resourceFactory = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Resource\ResourceFactory::class);
$recordData = [
'uid' => 0,
... | php | {
"resource": ""
} |
q247111 | ImageUtility.getBasicMetadata | validation | protected static function getBasicMetadata($fileName)
{
$extension = strtolower(substr($fileName, strrpos($fileName, '.') + 1));
$metadata = [];
if (GeneralUtility::inList('jpg,jpeg,tif,tiff', $extension) && function_exists('exif_read_data')) {
$exif = @exif_read_data($fileName);... | php | {
"resource": ""
} |
q247112 | ImageUtility.rationalToDecimal | validation | protected static function rationalToDecimal(array $components)
{
foreach ($components as $key => $value) {
$rationalParts = explode('/', $value);
if (!empty($rationalParts[1])) {
$components[$key] = $rationalParts[0] / $rationalParts[1];
} else {
... | php | {
"resource": ""
} |
q247113 | ImageUtility.getTransformation | validation | public static function getTransformation($orientation)
{
$transformation = '';
if (
(isset($GLOBALS['TYPO3_CONF_VARS']['GFX']['processor']) && $GLOBALS['TYPO3_CONF_VARS']['GFX']['processor'] === 'ImageMagick')
||
(isset($GLOBALS['TYPO3_CONF_VARS']['GFX']['im_versi... | php | {
"resource": ""
} |
q247114 | ImageUtility.isTransparentPng | validation | public static function isTransparentPng($fileName)
{
$bytes = file_get_contents($fileName, false, null, 24, 2); // read 24th and 25th bytes
$byte24 = ord($bytes{0});
$byte25 = ord($bytes{1});
if ($byte24 === 16 || $byte25 === 6 || $byte25 === 4) {
return true;
... | php | {
"resource": ""
} |
q247115 | ImageUtility.isAnimatedGif | validation | public static function isAnimatedGif($fileName)
{
if (($fh = fopen($fileName, 'rb')) === false) {
throw new \RuntimeException('Can\'t open ' . $fileName, 1454678600);
}
$count = 0;
// An animated gif contains multiple "frames", with each frame having a
// header m... | php | {
"resource": ""
} |
q247116 | FormFlexAjaxControllerV8.containerAdd | validation | public function containerAdd(ServerRequestInterface $request, ResponseInterface $response): ResponseInterface
{
$GLOBALS['TCA']['tx_imageautoresize'] = include(ExtensionManagementUtility::extPath('image_autoresize') . 'Configuration/TCA/Module/Options.php');
$GLOBALS['TCA']['tx_imageautoresize']['aj... | php | {
"resource": ""
} |
q247117 | Graphics.getImageFileExtensions | validation | public function getImageFileExtensions(array $settings)
{
$languageService = $this->getLanguageService();
$extensions = GeneralUtility::trimExplode(',', strtolower($GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']), true);
// We don't consider PDF being an image...
if ($key = arra... | php | {
"resource": ""
} |
q247118 | FAL.findExistingFile | validation | protected static function findExistingFile($fileName)
{
$file = null;
$relativePath = substr(PathUtility::dirname($fileName), strlen(PATH_site));
$resourceFactory = \TYPO3\CMS\Core\Resource\ResourceFactory::getInstance();
$targetFolder = $resourceFactory->retrieveFileOrFolderObject($... | php | {
"resource": ""
} |
q247119 | FAL.updateIndex | validation | protected static function updateIndex(\TYPO3\CMS\Core\Resource\File $file = null, $width, $height, array $metadata = [])
{
if (count($metadata) > 0) {
/** @var \TYPO3\CMS\Core\Resource\Index\MetaDataRepository $metadataRepository */
$metadataRepository = GeneralUtility::makeInstance(... | php | {
"resource": ""
} |
q247120 | FAL.createIndex | validation | protected static function createIndex($fileName, $width, $height)
{
$relativePath = substr(PathUtility::dirname($fileName), strlen(PATH_site));
$resourceFactory = \TYPO3\CMS\Core\Resource\ResourceFactory::getInstance();
$targetFolder = $resourceFactory->retrieveFileOrFolderObject($relativePa... | php | {
"resource": ""
} |
q247121 | FAL.accessProtectedProperty | validation | protected static function accessProtectedProperty($object, $propertyName)
{
$className = get_class($object);
if (!isset(static::$reflectedClasses[$className])) {
static::$reflectedClasses[$className] = new \ReflectionClass($className);
}
$class = static::$reflectedClasses... | php | {
"resource": ""
} |
q247122 | FileUploadHook.processUpload_postProcessAction | validation | public function processUpload_postProcessAction(&$filename, DataHandler $pObj)
{
$filename = static::$imageResizer->processFile(
$filename,
'', // Target file name
'', // Target directory
null,
$GLOBALS['BE_USER'],
[$this, 'notify']
... | php | {
"resource": ""
} |
q247123 | JpegExifOrient.read_1_byte | validation | protected static function read_1_byte($handle)
{
$c = fgetc($handle);
if ($c === false) {
throw new \RuntimeException('Premature EOF in JPEG file', 1363533326);
}
return ord($c);
} | php | {
"resource": ""
} |
q247124 | OrderlyBehavior.beforeFind | validation | public function beforeFind(Event $event, Query $query, ArrayObject $options, $primary)
{
$orders = $this->_config['orders'];
$args = [$query, $options, $primary];
foreach ($orders as $config) {
if ((!empty($config['callback'])
&& call_user_func_array($config... | php | {
"resource": ""
} |
q247125 | OrderlyBehavior._normalizeConfig | validation | protected function _normalizeConfig($orders)
{
if (empty($orders)) {
$orders = [[]];
} elseif (isset($orders['order']) || isset($orders['callback'])) {
$orders = [$orders];
}
$default = [
'order' => $this->_table->aliasField($this->_table->getDisp... | php | {
"resource": ""
} |
q247126 | ButtonDropdown.renderDropdown | validation | protected function renderDropdown()
{
$config = $this->dropdown;
$config['clientOptions'] = false;
$config['view'] = $this->getView();
return Dropdown::widget($config);
} | php | {
"resource": ""
} |
q247127 | TSDNS.resolve | validation | public function resolve($tsdns)
{
$this->getTransport()->sendLine($tsdns);
$repl = $this->getTransport()->readLine();
$this->getTransport()->disconnect();
if ($repl->section(":", 0)->toInt() == 404) {
throw new Ts3Exception("unable to resolve TSDNS hostname (" . $tsdns .... | php | {
"resource": ""
} |
q247128 | AbstractNode.iconGetName | validation | public function iconGetName($key)
{
$iconid = ($this[$key] < 0) ? (pow(2, 32)) - ($this[$key] * -1) : $this[$key];
return new StringHelper("/icon_" . $iconid);
} | php | {
"resource": ""
} |
q247129 | AbstractNode.getClass | validation | public function getClass($prefix = "ts3_")
{
if ($this instanceof Channel && $this->isSpacer()) {
return $prefix . "spacer";
} elseif ($this instanceof Client && $this["client_type"]) {
return $prefix . "query";
}
return $prefix . StringHelper::factory(get_cl... | php | {
"resource": ""
} |
q247130 | AbstractNode.getViewer | validation | public function getViewer(IViewer $viewer)
{
$html = $viewer->fetchObject($this);
$iterator = new \RecursiveIteratorIterator($this, \RecursiveIteratorIterator::SELF_FIRST);
foreach ($iterator as $node) {
$siblings = array();
for ($level = 0; $level < $iterator->get... | php | {
"resource": ""
} |
q247131 | AbstractNode.filterList | validation | protected function filterList(array $nodes = array(), array $rules = array())
{
if (!empty($rules)) {
foreach ($nodes as $node) {
if (!$node instanceof AbstractNode) {
continue;
}
$props = $node->getInfo(false);
... | php | {
"resource": ""
} |
q247132 | Convert.permissionType | validation | public static function permissionType($type)
{
if ($type == TeamSpeak3::PERM_TYPE_SERVERGROUP) {
return "Server Group";
}
if ($type == TeamSpeak3::PERM_TYPE_CLIENT) {
return "Client";
}
if ($type == TeamSpeak3::PERM_TYPE_CHANNEL) {
return "... | php | {
"resource": ""
} |
q247133 | Convert.logEntry | validation | public static function logEntry($entry)
{
$parts = explode("|", $entry, 5);
$array = array();
if (count($parts) != 5) {
$array["timestamp"] = 0;
$array["level"] = TeamSpeak3::LOGLEVEL_ERROR;
$array["channel"] = "ParamParser";
$array["server_id... | php | {
"resource": ""
} |
q247134 | TemplatesController.listAudioTemplates | validation | public function listAudioTemplates(CachePolicy $cachePolicy = null)
{
$parameters = [
'query' => [],
'body' => json_encode([], JSON_UNESCAPED_UNICODE),
'headers' => [],
];
$result = $this->get('v1/templates/audio', $parameters, $cachePolicy);
fore... | php | {
"resource": ""
} |
q247135 | TemplatesController.retrieveAudioTemplate | validation | public function retrieveAudioTemplate($id, CachePolicy $cachePolicy = null)
{
$parameters = [
'query' => [],
'body' => json_encode([], JSON_UNESCAPED_UNICODE),
'headers' => [],
];
$result = $this->get('v1/templates/audiotemplate', $parameters, $cachePolic... | php | {
"resource": ""
} |
q247136 | TemplatesController.listImageTemplates | validation | public function listImageTemplates(CachePolicy $cachePolicy = null)
{
$parameters = [
'query' => [],
'body' => json_encode([], JSON_UNESCAPED_UNICODE),
'headers' => [],
];
$result = $this->get('v1/templates/images', $parameters, $cachePolicy);
for... | php | {
"resource": ""
} |
q247137 | TemplatesController.retrieveImageTemplate | validation | public function retrieveImageTemplate($id, CachePolicy $cachePolicy = null)
{
$parameters = [
'query' => [],
'body' => json_encode([], JSON_UNESCAPED_UNICODE),
'headers' => [],
];
$result = $this->get('v1/templates/images/' . $id . '', $parameters, $cache... | php | {
"resource": ""
} |
q247138 | TemplatesController.listVideoTemplates | validation | public function listVideoTemplates(CachePolicy $cachePolicy = null)
{
$parameters = [
'query' => [],
'body' => json_encode([], JSON_UNESCAPED_UNICODE),
'headers' => [],
];
$result = $this->get('v1/templates/videos', $parameters, $cachePolicy);
for... | php | {
"resource": ""
} |
q247139 | TemplatesController.retrieveVideoTemplate | validation | public function retrieveVideoTemplate($id, CachePolicy $cachePolicy = null)
{
$parameters = [
'query' => [],
'body' => json_encode([], JSON_UNESCAPED_UNICODE),
'headers' => [],
];
$result = $this->get('v1/templates/videos/' . $id . '', $parameters, $cache... | php | {
"resource": ""
} |
q247140 | AccountsController.listFunctionalities | validation | public function listFunctionalities($includeDeleted = false, CachePolicy $cachePolicy = null)
{
$parameters = [
'query' => ['includeDeleted' => $includeDeleted],
'body' => json_encode([], JSON_UNESCAPED_UNICODE),
'headers' => [],
];
$result = $this->get('... | php | {
"resource": ""
} |
q247141 | AccountsController.retrieveFunctionality | validation | public function retrieveFunctionality($id, CachePolicy $cachePolicy = null)
{
$parameters = [
'query' => [],
'body' => json_encode([], JSON_UNESCAPED_UNICODE),
'headers' => [],
];
$result = $this->get('v1/accounts/functionalities/' . $id . '', $parameters... | php | {
"resource": ""
} |
q247142 | AccountsController.listGroups | validation | public function listGroups($includeDeleted = false, CachePolicy $cachePolicy = null)
{
$parameters = [
'query' => ['includeDeleted' => $includeDeleted],
'body' => json_encode([], JSON_UNESCAPED_UNICODE),
'headers' => [],
];
$result = $this->get('v1/accoun... | php | {
"resource": ""
} |
q247143 | AccountsController.retrieveGroup | validation | public function retrieveGroup($id, CachePolicy $cachePolicy = null)
{
$parameters = [
'query' => [],
'body' => json_encode([], JSON_UNESCAPED_UNICODE),
'headers' => [],
];
$result = $this->get('v1/accounts/groups/' . $id . '', $parameters, $cachePolicy);
... | php | {
"resource": ""
} |
q247144 | AccountsController.retrieveCurrentUser | validation | public function retrieveCurrentUser(CachePolicy $cachePolicy = null)
{
$parameters = [
'query' => [],
'body' => json_encode([], JSON_UNESCAPED_UNICODE),
'headers' => [],
];
$result = $this->get('v1/accounts/me', $parameters, $cachePolicy);
$result... | php | {
"resource": ""
} |
q247145 | AccountsController.listRoles | validation | public function listRoles($includeDeleted = false, CachePolicy $cachePolicy = null)
{
$parameters = [
'query' => ['includeDeleted' => $includeDeleted],
'body' => json_encode([], JSON_UNESCAPED_UNICODE),
'headers' => [],
];
$result = $this->get('v1/account... | php | {
"resource": ""
} |
q247146 | AccountsController.retrieveRole | validation | public function retrieveRole($id, CachePolicy $cachePolicy = null)
{
$parameters = [
'query' => [],
'body' => json_encode([], JSON_UNESCAPED_UNICODE),
'headers' => [],
];
$result = $this->get('v1/accounts/roles/' . $id . '', $parameters, $cachePolicy);
... | php | {
"resource": ""
} |
q247147 | AccountsController.listSettings | validation | public function listSettings(CachePolicy $cachePolicy = null)
{
$parameters = [
'query' => [],
'body' => json_encode([], JSON_UNESCAPED_UNICODE),
'headers' => [],
];
$result = $this->get('v1/accounts/settings', $parameters, $cachePolicy);
return ... | php | {
"resource": ""
} |
q247148 | AccountsController.retrieveSetting | validation | public function retrieveSetting($key, CachePolicy $cachePolicy = null)
{
$parameters = [
'query' => [],
'body' => json_encode([], JSON_UNESCAPED_UNICODE),
'headers' => [],
];
$result = $this->get('v1/accounts/settings/' . $key . '', $parameters, $cachePol... | php | {
"resource": ""
} |
q247149 | AccountsController.listUsers | validation | public function listUsers($includeDeleted = false, CachePolicy $cachePolicy = null)
{
$parameters = [
'query' => ['includeDeleted' => $includeDeleted],
'body' => json_encode([], JSON_UNESCAPED_UNICODE),
'headers' => [],
];
$result = $this->get('v1/account... | php | {
"resource": ""
} |
q247150 | AccountsController.retrieveUser | validation | public function retrieveUser($id, CachePolicy $cachePolicy = null)
{
$parameters = [
'query' => [],
'body' => json_encode([], JSON_UNESCAPED_UNICODE),
'headers' => [],
];
$result = $this->get('v1/accounts/users/' . $id . '', $parameters, $cachePolicy);
... | php | {
"resource": ""
} |
q247151 | AccountsController.createSetting | validation | public function createSetting($key, $value)
{
$parameters = [
'query' => [],
'body' => json_encode(['key' => $key, 'value' => $value], JSON_UNESCAPED_UNICODE),
'headers' => [],
];
$result = $this->post('v1/accounts/settings', $parameters);
return... | php | {
"resource": ""
} |
q247152 | AccountsController.createUser | validation | public function createUser(User $user, $password = null, $redirectTo = null, $sendNotificationEmail = null)
{
$parameters = [
'query' => [],
'body' => json_encode(['user' => $user, 'password' => $password, 'redirectTo' => $redirectTo, 'sendNotificationEmail' => $sendNotificationEmail... | php | {
"resource": ""
} |
q247153 | AccountsController.updateUser | validation | public function updateUser($id, User $user, $password = null)
{
$parameters = [
'query' => [],
'body' => json_encode(['user' => $user, 'password' => $password], JSON_UNESCAPED_UNICODE),
'headers' => [],
];
$result = $this->post('v1/accounts/users/' . $id ... | php | {
"resource": ""
} |
q247154 | AccountsController.addUserToGroup | validation | public function addUserToGroup($id, array $groupIds)
{
$parameters = [
'query' => [],
'body' => json_encode(['groupIds' => $groupIds], JSON_UNESCAPED_UNICODE),
'headers' => [],
];
$result = $this->post('v1/accounts/users/' . $id . '/groups', $parameters);... | php | {
"resource": ""
} |
q247155 | AccountsController.updateLastLogin | validation | public function updateLastLogin($id, $successful = null)
{
$parameters = [
'query' => [],
'body' => json_encode(['successful' => $successful], JSON_UNESCAPED_UNICODE),
'headers' => [],
];
$result = $this->post('v1/accounts/users/' . $id . '/registerlogina... | php | {
"resource": ""
} |
q247156 | AccountsController.sendPasswordReset | validation | public function sendPasswordReset($id, $link = null)
{
$parameters = [
'query' => [],
'body' => json_encode(['link' => $link], JSON_UNESCAPED_UNICODE),
'headers' => [],
];
$result = $this->post('v1/accounts/users/' . $id . '/resetpassword', $parameters);
... | php | {
"resource": ""
} |
q247157 | AccountsController.resetPassword | validation | public function resetPassword($hash, $password)
{
$parameters = [
'query' => [],
'body' => json_encode(['hash' => $hash, 'password' => $password], JSON_UNESCAPED_UNICODE),
'headers' => [],
];
$result = $this->post('v1/accounts/users/resetpassword', $param... | php | {
"resource": ""
} |
q247158 | AccountsController.updateSetting | validation | public function updateSetting($key, $value)
{
$parameters = [
'query' => [],
'body' => json_encode(['value' => $value], JSON_UNESCAPED_UNICODE),
'headers' => [],
];
$result = $this->put('v1/accounts/settings/' . $key . '', $parameters);
return $r... | php | {
"resource": ""
} |
q247159 | Crypt.setSecretKey | validation | protected function setSecretKey($passphrase)
{
$length = strlen($passphrase);
if (strlen($passphrase) < 1 || strlen($passphrase) > 56) {
throw new Ts3Exception(
"secret passphrase must contain at least one but less than 56 characters"
);
}
$k... | php | {
"resource": ""
} |
q247160 | MoodboardResponse.setCreated | validation | public function setCreated($created)
{
if ($created instanceof DateTime) {
$this->created = $created;
} else {
try {
$this->created = new DateTime($created);
} catch (\Exception $e) {
$this->created = null;
}
}
... | php | {
"resource": ""
} |
q247161 | MoodboardResponse.setUpdated | validation | public function setUpdated($updated)
{
if ($updated instanceof DateTime) {
$this->updated = $updated;
} else {
try {
$this->updated = new DateTime($updated);
} catch (\Exception $e) {
$this->updated = null;
}
}
... | php | {
"resource": ""
} |
q247162 | MoodboardResponse.getProperty | validation | public function getProperty($systemName)
{
foreach ($this->propertySets as $propertySet) {
/** @var PropertySet $propertySet */
foreach ($propertySet->getProperties() as $property) {
if ($property->getPropertyType()->getSystemName() == $systemName) {
... | php | {
"resource": ""
} |
q247163 | MoodboardResponse.setPropertySets | validation | public function setPropertySets(array $propertySets)
{
$this->propertySets = [];
foreach ($propertySets as $item) {
$this->addPropertySet($item);
}
return $this;
} | php | {
"resource": ""
} |
q247164 | MoodboardResponse.addPropertySet | validation | public function addPropertySet($item)
{
if (!($item instanceof PropertySet)) {
if (is_array($item)) {
try {
$item = new PropertySet($item);
} catch (\Exception $e) {
trigger_error('Could not auto-instantiate PropertySet. ' .... | php | {
"resource": ""
} |
q247165 | FilterItem.setFilterItems | validation | public function setFilterItems(array $filterItems)
{
$this->filterItems = [];
foreach ($filterItems as $item) {
$this->addFilterItem($item);
}
return $this;
} | php | {
"resource": ""
} |
q247166 | FilterItem.addFilterItem | validation | public function addFilterItem($item)
{
if (!($item instanceof self)) {
if (is_array($item)) {
try {
$item = new self($item);
} catch (\Exception $e) {
trigger_error('Could not auto-instantiate FilterItem. ' . $e->getMessage(... | php | {
"resource": ""
} |
q247167 | CategoriesController.listCategories | validation | public function listCategories(CachePolicy $cachePolicy = null)
{
$parameters = [
'query' => [],
'body' => json_encode([], JSON_UNESCAPED_UNICODE),
'headers' => [],
];
$result = $this->get('v1/categories', $parameters, $cachePolicy);
foreach ($res... | php | {
"resource": ""
} |
q247168 | CategoriesController.retrieveCategory | validation | public function retrieveCategory($id, CachePolicy $cachePolicy = null)
{
$parameters = [
'query' => [],
'body' => json_encode([], JSON_UNESCAPED_UNICODE),
'headers' => [],
];
$result = $this->get('v1/categories/' . $id . '', $parameters, $cachePolicy);
... | php | {
"resource": ""
} |
q247169 | CategoriesController.createCategory | validation | public function createCategory(Category $category)
{
$parameters = [
'query' => [],
'body' => json_encode(['category' => $category], JSON_UNESCAPED_UNICODE),
'headers' => [],
];
$result = $this->post('v1/categories', $parameters);
$result = new Ca... | php | {
"resource": ""
} |
q247170 | CategoriesController.updateCategory | validation | public function updateCategory($id, Category $category)
{
$parameters = [
'query' => [],
'body' => json_encode(['category' => $category], JSON_UNESCAPED_UNICODE),
'headers' => [],
];
$result = $this->post('v1/categories/' . $id . '', $parameters);
... | php | {
"resource": ""
} |
q247171 | CategoriesController.removeCategory | validation | public function removeCategory($id)
{
$parameters = [
'query' => [],
'body' => json_encode([], JSON_UNESCAPED_UNICODE),
'headers' => [],
];
$result = $this->delete('v1/categories/' . $id . '', $parameters);
$result = new CategoryResponse($result);... | php | {
"resource": ""
} |
q247172 | Protocol.setDefinition | validation | public function setDefinition($definition)
{
if (is_array($definition)) {
$this->definition = $definition;
return $this;
}
$this->definition = json_decode($definition, true);
if (null === $this->definition) {
$this->definition = $definition;
... | php | {
"resource": ""
} |
q247173 | User.setEndDate | validation | public function setEndDate($endDate)
{
if ($endDate instanceof DateTime) {
$this->endDate = $endDate;
} else {
try {
$this->endDate = new DateTime($endDate);
} catch (\Exception $e) {
$this->endDate = null;
}
}
... | php | {
"resource": ""
} |
q247174 | User.setStartDate | validation | public function setStartDate($startDate)
{
if ($startDate instanceof DateTime) {
$this->startDate = $startDate;
} else {
try {
$this->startDate = new DateTime($startDate);
} catch (\Exception $e) {
$this->startDate = null;
... | php | {
"resource": ""
} |
q247175 | User.setLastLogin | validation | public function setLastLogin($lastLogin)
{
if ($lastLogin instanceof DateTime) {
$this->lastLogin = $lastLogin;
} else {
try {
$this->lastLogin = new DateTime($lastLogin);
} catch (\Exception $e) {
$this->lastLogin = null;
... | php | {
"resource": ""
} |
q247176 | User.setGroups | validation | public function setGroups(array $groups)
{
$this->groups = [];
foreach ($groups as $item) {
$this->addGroup($item);
}
return $this;
} | php | {
"resource": ""
} |
q247177 | User.addGroup | validation | public function addGroup($item)
{
if (!($item instanceof Group)) {
if (is_array($item)) {
try {
$item = new Group($item);
} catch (\Exception $e) {
trigger_error('Could not auto-instantiate Group. ' . $e->getMessage(), E_USE... | php | {
"resource": ""
} |
q247178 | User.setFunctionalities | validation | public function setFunctionalities(array $functionalities)
{
$this->functionalities = [];
foreach ($functionalities as $item) {
$this->addFunctionality($item);
}
return $this;
} | php | {
"resource": ""
} |
q247179 | User.addFunctionality | validation | public function addFunctionality($item)
{
if (!($item instanceof Functionality)) {
if (is_array($item)) {
try {
$item = new Functionality($item);
} catch (\Exception $e) {
trigger_error('Could not auto-instantiate Functional... | php | {
"resource": ""
} |
q247180 | User.setExtraData | validation | public function setExtraData(array $extraData)
{
$this->extraData = [];
foreach ($extraData as $item) {
$this->addExtraData($item);
}
return $this;
} | php | {
"resource": ""
} |
q247181 | User.addExtraData | validation | public function addExtraData($item)
{
if (!($item instanceof ExtraData)) {
if (is_array($item)) {
try {
$item = new ExtraData($item);
} catch (\Exception $e) {
trigger_error('Could not auto-instantiate ExtraData. ' . $e->get... | php | {
"resource": ""
} |
q247182 | TCP.connect | validation | public function connect()
{
if ($this->stream !== null) {
return;
}
$host = strval($this->config["host"]);
$port = strval($this->config["port"]);
$address = "tcp://" . $host . ":" . $port;
$timeout = intval($this->config["timeout"]);
$this->stre... | php | {
"resource": ""
} |
q247183 | TCP.readLine | validation | public function readLine($token = "\n")
{
$this->connect();
$line = StringHelper::factory("");
while (!$line->endsWith($token)) {
$this->waitForReadyRead();
$data = @fgets($this->stream, 4096);
Signal::getInstance()->emit(strtolower($this->getAdapterTy... | php | {
"resource": ""
} |
q247184 | Text.fetchObject | validation | public function fetchObject(AbstractNode $node, array $siblings = array())
{
$this->currObj = $node;
$this->currSib = $siblings;
$args = array(
$this->getPrefix(),
$this->getCorpusIcon(),
$this->getCorpusName(),
);
return StringHelper::fa... | php | {
"resource": ""
} |
q247185 | FiltersController.categories | validation | public function categories($categoryIds, $deploymentSiteIds = null, $ignoreGrouping = false, CachePolicy $cachePolicy = null)
{
$parameters = [
'query' => ['deploymentSiteIds' => $deploymentSiteIds, 'ignoreGrouping' => $ignoreGrouping],
'body' => json_encode([], JSON_UNESCAPED_UNICOD... | php | {
"resource": ""
} |
q247186 | FiltersController.freetext | validation | public function freetext($freetext, $deploymentSiteIds = null, $mode = self::FREETEXT_OR, $ignoreGrouping = false, CachePolicy $cachePolicy = null)
{
$parameters = [
'query' => ['deploymentSiteIds' => $deploymentSiteIds, 'mode' => $mode, 'ignoreGrouping' => $ignoreGrouping],
'body' =... | php | {
"resource": ""
} |
q247187 | FiltersController.property | validation | public function property($systemName, $preloadNames = false, $categoryIds = null, $deploymentSiteIds = null, $isHierarchical = false, $ignoreGrouping = false, CachePolicy $cachePolicy = null)
{
$parameters = [
'query' => ['preloadNames' => $preloadNames, 'categoryIds' => $categoryIds, 'deploymen... | php | {
"resource": ""
} |
q247188 | AbstractTransport.getAdapterType | validation | public function getAdapterType()
{
if ($this->adapter instanceof AbstractAdapter) {
$string = StringHelper::factory(get_class($this->adapter));
return $string->substr($string->findLast("\\"))->replace(array("\\", " "), "")->toString();
}
return "Unknown";
} | php | {
"resource": ""
} |
q247189 | AbstractTransport.waitForReadyRead | validation | protected function waitForReadyRead($time = 0)
{
if (!$this->isConnected() || $this->config["blocking"]) {
return;
}
do {
$read = array($this->stream);
$null = null;
if ($time) {
Signal::getInstance()->emit(
... | php | {
"resource": ""
} |
q247190 | SearchResult.setResults | validation | public function setResults(array $results)
{
$this->results = [];
foreach ($results as $item) {
/** $item ObjectResponse */
switch ($item['discriminatorId']) {
case ObjectResponse::DISCRIMINATOR_FOLDER:
$this->addFolderResponse($item);
... | php | {
"resource": ""
} |
q247191 | SearchResult.addMediaResponse | validation | public function addMediaResponse($item)
{
if (!($item instanceof MediaResponse)) {
if (is_array($item)) {
try {
$item = new MediaResponse($item);
} catch (\Exception $e) {
trigger_error('Could not auto-instantiate MediaRespo... | php | {
"resource": ""
} |
q247192 | SearchResult.addFolderResponse | validation | public function addFolderResponse($item)
{
if (!($item instanceof FolderResponse)) {
if (is_array($item)) {
try {
$item = new FolderResponse($item);
} catch (\Exception $e) {
trigger_error('Could not auto-instantiate FolderR... | php | {
"resource": ""
} |
q247193 | SlideStructure.setTransition | validation | public function setTransition($transition)
{
if ($transition instanceof SlideTransition) {
$this->transition = $transition;
} elseif (is_array($transition)) {
$this->transition = new SlideTransition($transition);
} else {
$this->transition = null;
... | php | {
"resource": ""
} |
q247194 | Server.channelList | validation | public function channelList(array $filter = array())
{
if ($this->channelList === null) {
$channels = $this->request("channellist -topic -flags -voice -limits -icon")->toAssocArray("cid");
$this->channelList = array();
foreach ($channels as $cid => $channel) {
... | php | {
"resource": ""
} |
q247195 | Server.channelCreate | validation | public function channelCreate(array $properties)
{
$cid = $this->execute("channelcreate", $properties)->toList();
$this->channelListReset();
if (!isset($properties["client_flag_permanent"]) && !isset($properties["client_flag_semi_permanent"])) {
$this->getParent()->whoamiSet("cl... | php | {
"resource": ""
} |
q247196 | Server.channelPermList | validation | public function channelPermList($cid, $permsid = false)
{
return $this->execute("channelpermlist", array("cid" => $cid, $permsid ? "-permsid" : null))->toAssocArray(
$permsid ? "permsid" : "permid"
);
} | php | {
"resource": ""
} |
q247197 | Server.channelClientPermList | validation | public function channelClientPermList($cid, $cldbid, $permsid = false)
{
return $this->execute(
"channelclientpermlist",
array("cid" => $cid, "cldbid" => $cldbid, $permsid ? "-permsid" : null)
)->toAssocArray($permsid ? "permsid" : "permid");
} | php | {
"resource": ""
} |
q247198 | Server.channelGetByName | validation | public function channelGetByName($name)
{
foreach ($this->channelList() as $channel) {
if ($channel["channel_name"] == $name) {
return $channel;
}
}
throw new Ts3Exception("invalid channelID", 0x300);
} | php | {
"resource": ""
} |
q247199 | Server.clientGetById | validation | public function clientGetById($clid)
{
if (!array_key_exists((string)$clid, $this->clientList())) {
throw new Ts3Exception("invalid clientID", 0x200);
}
return $this->clientList[intval((string)$clid)];
} | php | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.