_id stringlengths 2 7 | title stringlengths 3 151 | partition stringclasses 3
values | text stringlengths 83 13k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q249100 | WorkflowServiceProvider.registerWorkflowRunnersHook | validation | private function registerWorkflowRunnersHook()
{
$this->app->afterResolving(function(WorkflowRunner $runner, $app)
{
$runner->setWorkflow($app['cerbero.workflow']);
});
} | php | {
"resource": ""
} |
q249101 | WorkflowServiceProvider.registerCommands | validation | private function registerCommands()
{
foreach ($this->commands as $command)
{
$name = ucfirst(last(explode('.', $command)));
$this->app->singleton($command, function($app) use($name)
{
return $app["Cerbero\Workflow\Console\Commands\\{$name}WorkflowCommand"];
});
}
} | php | {
"resource": ""
} |
q249102 | Drawer.draw | validation | public function draw($workflow)
{
$this->geometry->setCore($workflow);
$this->setPipesOfWorkflow($workflow);
$this->drawCenteredChar(static::NOCK);
$this->drawPipesBeginning();
$this->drawCore();
$this->drawPipesEnd();
$this->drawCenteredChar(static::PILE);
return $this->drawing;
} | php | {
"resource": ""
} |
q249103 | Drawer.setPipesOfWorkflow | validation | protected function setPipesOfWorkflow($workflow)
{
$pipes = $this->pipelines->getPipesByPipeline($workflow);
$this->pipes = array_map(function($pipe)
{
$chunks = explode('\\', $pipe);
return end($chunks);
}, $pipes);
$this->geometry->setPipes($this->pipes);
} | php | {
"resource": ""
} |
q249104 | Drawer.drawCenteredChar | validation | protected function drawCenteredChar($character)
{
$spaces = str_repeat(' ', $this->geometry->getHalfWidth());
$this->drawRow($spaces . $character);
} | php | {
"resource": ""
} |
q249105 | Drawer.drawPipesBeginning | validation | protected function drawPipesBeginning()
{
foreach ($this->pipes as $pipe)
{
$this->drawBorderTop();
$this->drawBordered(
$this->geometry->getSpacedPipe($pipe, static::NOCK, 'before()')
);
}
} | php | {
"resource": ""
} |
q249106 | Drawer.drawBordered | validation | protected function drawBordered($content)
{
$left = $this->geometry->getLeftBordersWith(static::BORDER_X);
$right = $this->geometry->getRightBordersWith(static::BORDER_X);
$this->drawRow($left.$content.$right);
} | php | {
"resource": ""
} |
q249107 | Drawer.drawBorderTop | validation | protected function drawBorderTop($isCore = false)
{
$crossroads = $isCore ? static::CROSSROADS_UP : static::CROSSROADS;
$this->drawBorder(static::BORDER_NW, $crossroads, static::BORDER_NE);
$this->geometry->increaseNesting();
} | php | {
"resource": ""
} |
q249108 | Drawer.drawBorder | validation | protected function drawBorder($left, $middle, $right)
{
$width = $this->geometry->getWidthButBorders();
$border = str_repeat(static::BORDER_Y, $width);
$this->replaceUtf8($border, $left, 0);
$this->replaceUtf8($border, $middle, floor($width / 2));
$this->replaceUtf8($border, $right, $width - 1);
$this->... | php | {
"resource": ""
} |
q249109 | Drawer.replaceUtf8 | validation | private function replaceUtf8(&$original, $replacement, $position)
{
$start = mb_substr($original, 0, $position, "UTF-8");
$end = mb_substr($original, $position + 1, mb_strlen($original, 'UTF-8'), "UTF-8");
$original = $start . $replacement . $end;
} | php | {
"resource": ""
} |
q249110 | Drawer.drawCore | validation | protected function drawCore()
{
$this->drawBorderTop(true);
$this->drawBordered($this->geometry->getSpacedCore());
$this->drawBorderBottom(true);
} | php | {
"resource": ""
} |
q249111 | Drawer.drawBorderBottom | validation | protected function drawBorderBottom($isCore = false)
{
$this->geometry->decreaseNesting();
$crossroads = $isCore ? static::CROSSROADS_DOWN : static::CROSSROADS;
$this->drawBorder(static::BORDER_SW, $crossroads, static::BORDER_SE);
} | php | {
"resource": ""
} |
q249112 | Drawer.drawPipesEnd | validation | protected function drawPipesEnd()
{
$pipes = array_reverse($this->pipes);
foreach ($pipes as $pipe)
{
$this->drawBordered(
$this->geometry->getSpacedPipe($pipe, static::NOCK, 'after()')
);
$this->drawBorderBottom();
}
} | php | {
"resource": ""
} |
q249113 | Zenziva.send | validation | public function send(array $destinations, string $message): ?array
{
$this->checkConfig();
if (!empty($destinations)) {
$destination = $destinations[0];
}
$query = http_build_query([
'userkey' => $this->userkey,
'passkey' => $this->passkey,
... | php | {
"resource": ""
} |
q249114 | Zenziva.credit | validation | public function credit(): ?array
{
$this->checkConfig();
$query = http_build_query([
'userkey' => $this->userkey,
'passkey' => $this->passkey,
]);
$response = Request::get($this->baseUrl.'/smsapibalance.php?'.$query);
$xml = simplexml_load_string($r... | php | {
"resource": ""
} |
q249115 | Zenziva.checkConfig | validation | private function checkConfig(): void
{
if (empty($this->userkey)) {
Log::warning('Config "message.zenziva.userkey" is not defined.');
}
if (empty($this->passkey)) {
Log::warning('Config "message.zenziva.passkey" is not defined.');
}
} | php | {
"resource": ""
} |
q249116 | CreateWorkflowCommand.settleRepositoryIfNotExists | validation | protected function settleRepositoryIfNotExists()
{
$source = $this->pipelines->getSource();
if( ! $this->files->exists($source))
{
$this->pipelines->settle();
}
} | php | {
"resource": ""
} |
q249117 | CreateWorkflowCommand.generateRequestIfGuarded | validation | protected function generateRequestIfGuarded()
{
if( ! $this->option('unguard'))
{
$name = $this->inflector->getRequest();
$this->call('make:request', compact('name'));
}
} | php | {
"resource": ""
} |
q249118 | LogViewerServiceProvider.setupPackage | validation | protected function setupPackage()
{
$source = realpath(__DIR__.'/../config/logviewer.php');
$this->publishes([$source => config_path('logviewer.php')], 'config');
$this->publishes([
realpath(__DIR__.'/../assets/css') => public_path('assets/styles'),
realpath(__DIR__.... | php | {
"resource": ""
} |
q249119 | LogViewerServiceProvider.registerLogFilesystem | validation | protected function registerLogFilesystem()
{
$this->app->singleton('logviewer.filesystem', function ($app) {
$files = $app['files'];
$path = $app['path.storage'].'/logs';
return new Filesystem($files, $path);
});
$this->app->alias('logviewer.filesystem',... | php | {
"resource": ""
} |
q249120 | LogViewerServiceProvider.registerLogViewer | validation | protected function registerLogViewer()
{
$this->app->singleton('logviewer', function ($app) {
$factory = $app['logviewer.factory'];
$filesystem = $app['logviewer.filesystem'];
$data = $app['logviewer.data'];
return new LogViewer($factory, $filesystem, $data);... | php | {
"resource": ""
} |
q249121 | LogViewerServiceProvider.registerLogViewerController | validation | protected function registerLogViewerController()
{
$this->app->bind(LogViewerController::class, function ($app) {
$perPage = $app['config']['logviewer.per_page'];
$middleware = $app['config']['logviewer.middleware'];
return new LogViewerController($perPage, $middleware);... | php | {
"resource": ""
} |
q249122 | Filesystem.read | validation | public function read($date)
{
try {
return $this->files->get($this->path($date));
} catch (FileNotFoundException $e) {
throw new FilesystemException('There was an reading the log.');
}
} | php | {
"resource": ""
} |
q249123 | LogViewerController.getIndex | validation | public function getIndex()
{
$today = Carbon::today()->format('Y-m-d');
if (Session::has('success') || Session::has('error')) {
Session::reflash();
}
return Redirect::to('logviewer/'.$today.'/all');
} | php | {
"resource": ""
} |
q249124 | LogViewerController.getDelete | validation | public function getDelete($date)
{
try {
LogViewer::delete($date);
$today = Carbon::today()->format('Y-m-d');
return Redirect::to('logviewer/'.$today.'/all')
->with('success', 'Log deleted successfully!');
} catch (\Exception $e) {
ret... | php | {
"resource": ""
} |
q249125 | LogViewerController.getShow | validation | public function getShow($date, $level = null)
{
$logs = LogViewer::logs();
if (!is_string($level)) {
$level = 'all';
}
$page = Input::get('page');
if (empty($page)) {
$page = '1';
}
$data = [
'logs' => $logs,
... | php | {
"resource": ""
} |
q249126 | LogViewerController.getData | validation | public function getData($date, $level = null)
{
if (!is_string($level)) {
$level = 'all';
}
$data = LogViewer::data($date, $level);
$paginator = new Paginator($data, $this->perPage);
$path = (new \ReflectionClass($paginator))->getProperty('path');
$path-... | php | {
"resource": ""
} |
q249127 | Data.levels | validation | public function levels()
{
if (!$this->levels) {
$class = new ReflectionClass(new LogLevel());
$this->levels = $class->getConstants();
}
return $this->levels;
} | php | {
"resource": ""
} |
q249128 | Log.parse | validation | protected function parse()
{
$log = [];
$pattern = "/\[\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\].*/";
preg_match_all($pattern, $this->raw, $headings);
$data = preg_split($pattern, $this->raw);
if ($data[0] < 1) {
$trash = array_shift($data);
unset($tras... | php | {
"resource": ""
} |
q249129 | LogViewer.logs | validation | public function logs()
{
$logs = array_reverse($this->filesystem->files());
foreach ($logs as $index => $file) {
$logs[$index] = preg_replace('/.*(\d{4}-\d{2}-\d{2}).*/', '$1', basename($file));
}
return $logs;
} | php | {
"resource": ""
} |
q249130 | Factory.make | validation | public function make($date, $level = 'all')
{
$raw = $this->filesystem->read($date);
$levels = $this->levels;
return new Log($raw, $levels, $level);
} | php | {
"resource": ""
} |
q249131 | EnvoyerDeployCommand.getDefaultProjectHook | validation | protected function getDefaultProjectHook()
{
// Get default project handle.
$default = $this->config->get(self::CONFIG_DEFAULT);
// Return project hook value.
return $this->config->get(sprintf(self::CONFIG_PROJECT, $default));
} | php | {
"resource": ""
} |
q249132 | EnvoyerDeployCommand.triggerDeploy | validation | protected function triggerDeploy($project)
{
// Ensure we have a project hook.
if (!$project) {
throw new InvalidArgumentException('Incorrect project hook.');
}
// Trigger the deploy hook.
file_get_contents(sprintf(self::DEPLOY_URL, $project));
// Output... | php | {
"resource": ""
} |
q249133 | BaseSchema.set | validation | public function set($property_name, $value)
{
$this->validateProperty($property_name, $value);
$this->data[$property_name] = $value;
return $this;
} | php | {
"resource": ""
} |
q249134 | BaseSchema.add | validation | public function add($property_name, $value)
{
$this->validateProperty($property_name, $value);
$this->data[$property_name][] =& $value;
return $this;
} | php | {
"resource": ""
} |
q249135 | BaseSchema.parseData | validation | private function parseData($data)
{
foreach ($data as $property_name => $property) {
//I think the best way to handle this, will at least always be consistent
//without writing the same code twice.
$types_to_try = [];
//Collect regular props
if (is... | php | {
"resource": ""
} |
q249136 | UploaderManager.extend | validation | public function extend($provider, Closure $callback)
{
if ($this->isProviderAliasExists($provider)) {
throw new InvalidArgumentException("Alias provider is already reserved [{$provider}]");
}
$this->customProviders[$provider] = $callback;
return $this;
} | php | {
"resource": ""
} |
q249137 | UploaderManager.from | validation | public function from($provider = null)
{
$provider = $provider ?: $this->getDefaultProvider();
return new Uploader(
$this->app->make('config'), $this->app->make('filesystem'), $this->createProviderInstance($provider)
);
} | php | {
"resource": ""
} |
q249138 | UploaderManager.createProviderInstance | validation | protected function createProviderInstance($provider)
{
if (! $this->isProviderAliasExists($provider)) {
throw new InvalidArgumentException("File provider [{$provider}] is invalid.");
}
if (! isset($this->resolvedProviders[$provider])) {
$this->resolvedProviders[$prov... | php | {
"resource": ""
} |
q249139 | UploaderManager.dynamicFrom | validation | protected function dynamicFrom($from)
{
$provider = Str::snake(substr($from, 4));
return $this->from($provider);
} | php | {
"resource": ""
} |
q249140 | UploaderManager.isProviderAliasExists | validation | protected function isProviderAliasExists($provider)
{
return array_key_exists($provider, $this->providers) || array_key_exists($provider, $this->customProviders);
} | php | {
"resource": ""
} |
q249141 | Uploader.upload | validation | public function upload($file, Closure $callback = null)
{
$uploadedFile = $this->runUpload($file);
if (! $uploadedFile) {
return false;
}
if ($callback) {
$callback($uploadedFile);
}
return true;
} | php | {
"resource": ""
} |
q249142 | Uploader.runUpload | validation | protected function runUpload($file)
{
$this->provider->setFile($file);
if (! $this->provider->isValid()) {
throw new InvalidFileException("Given file [{$file}] is invalid.");
}
$filename = $this->getFullFileName($this->provider);
if ($this->filesystem->disk($th... | php | {
"resource": ""
} |
q249143 | Uploader.getFullFileName | validation | protected function getFullFileName(Provider $provider)
{
$folder = $this->folder ? rtrim($this->folder, '/').'/' : '';
if ($this->filename) {
$filename = $this->filename;
} else {
$filename = md5(uniqid(microtime(true), true));
}
return $folder.$file... | php | {
"resource": ""
} |
q249144 | Uploader.dynamicUploadTo | validation | protected function dynamicUploadTo($uploadTo)
{
$disk = Str::snake(substr($uploadTo, 8));
return $this->uploadTo($disk);
} | php | {
"resource": ""
} |
q249145 | Shape.renderSides | validation | protected function renderSides($sides)
{
$lines = [];
$lines[] = Html::beginTag('div', $this->sidesOptions);
foreach($sides as $side) {
if(!array_key_exists('content', $side)) {
throw new InvalidConfigException("The 'content' option is required per sides");
... | php | {
"resource": ""
} |
q249146 | SideBar.renderToggleButton | validation | public function renderToggleButton()
{
if ($this->toggleButton !== false) {
$tag = ArrayHelper::remove($this->toggleButton, 'tag', 'div');
$label = ArrayHelper::remove($this->toggleButton, 'label', Html::tag('i', '', ['class' => 'content icon']));
Html::addCssClass($this... | php | {
"resource": ""
} |
q249147 | Menu.renderMenu | validation | protected function renderMenu($items, $parentItem)
{
$options = ArrayHelper::getValue($parentItem, 'options');
$label = $this->getLabel($parentItem);
$items = Html::tag('div', $this->renderItems($items), ['class' => 'menu']);
Html::addCssClass($options, 'ui');
Html::addCssCla... | php | {
"resource": ""
} |
q249148 | Menu.getLabel | validation | protected function getLabel($item)
{
$encodeLabel = isset($item['encode']) ? $item['encode'] : $this->encodeLabels;
return $encodeLabel ? Html::encode($item['label']) : $item['label'];
} | php | {
"resource": ""
} |
q249149 | Dropdown.renderDropdown | validation | protected function renderDropdown()
{
$lines = [];
$lines[] = $this->encodeText ? Html::encode($this->text) : $this->text;
if ($this->icon && is_string($this->icon)) {
$lines[] = $this->icon;
}
$lines[] = $this->renderItems($this->items, $this->options, $this->dis... | php | {
"resource": ""
} |
q249150 | Dropdown.renderSearchInput | validation | protected function renderSearchInput()
{
$lines = [];
$lines[] = Html::beginTag('div', ['class' =>'ui icon search input']);
$lines[] = Html::tag('i', '', ['class' => 'search icon']);
$lines[] = Html::input('text', $this->getId() . '-search', '', $this->searchInputOptions);
$l... | php | {
"resource": ""
} |
q249151 | Widget.init | validation | public function init()
{
parent::init();
Html::addCssClass($this->options, 'ui');
if (!isset($this->options['id'])) {
$this->options['id'] = $this->getId();
}
$this->registerTranslations();
} | php | {
"resource": ""
} |
q249152 | Widget.registerPlugin | validation | protected function registerPlugin($name)
{
$view = $this->getView();
SemanticUiPluginAsset::register($view);
$selector = $this->selector ? : '#' . $this->options['id'];
if ($this->clientOptions !== false) {
$options = empty($this->clientOptions) ? '' : Json::encode($this-... | php | {
"resource": ""
} |
q249153 | Modal.renderToggleButton | validation | protected function renderToggleButton()
{
if ($this->toggleButton !== false) {
$tag = ArrayHelper::remove($this->toggleButton, 'tag', 'div');
$label = ArrayHelper::remove($this->toggleButton, 'label', 'Show');
if ($tag === 'button' && !isset($this->toggleButton['type'])) ... | php | {
"resource": ""
} |
q249154 | Checkbox.renderInput | validation | protected function renderInput()
{
return $this->hasModel()
? Html::activeCheckbox($this->model, $this->attribute, $this->options)
: Html::checkbox($this->name, $this->checked, $this->options);
} | php | {
"resource": ""
} |
q249155 | Checkbox.renderLabel | validation | protected function renderLabel()
{
$label = $this->encodeLabel ? Html::encode($this->label) : $this->label;
return $this->hasModel()
? Html::activeLabel($this->model, $this->attribute, $this->labelOptions)
: Html::label($label, $this->getId(), $this->labelOptions);
} | php | {
"resource": ""
} |
q249156 | Message.registerClientScript | validation | public function registerClientScript()
{
if ($this->closeIcon !== false) {
$view = $this->getView();
DosAmigosAsset::register($view);
$view->registerJs("dosamigos.semantic.initMessageCloseButtons();");
}
} | php | {
"resource": ""
} |
q249157 | Message.initOptions | validation | public function initOptions()
{
Ui::addCssClasses($this->options, ['ui', 'message']);
if (!empty($this->header) && isset($this->header['options'])) {
Ui::addCssClass($this->header['options'], 'header');
}
if (isset($this->icon)) {
Ui::addCssClass($this->option... | php | {
"resource": ""
} |
q249158 | Radio.renderInput | validation | protected function renderInput()
{
return $this->hasModel()
? Html::activeRadio($this->model, $this->attribute, $this->options)
: Html::radio($this->name, $this->checked, $this->options);
} | php | {
"resource": ""
} |
q249159 | Element.labelGroup | validation | public static function labelGroup($labels = [], $options = [])
{
Ui::addCssClasses($options, ['ui', 'labels']);
$lines = [];
foreach ($labels as $label) {
$content = ArrayHelper::remove($label, 'content');
$lines[] = static::label($content, $label);
}
... | php | {
"resource": ""
} |
q249160 | Search.renderInput | validation | protected function renderInput($options = [], $resultsOptions = [])
{
Html::addCssClass($options, 'prompt');
$lines = [];
$input = $this->hasModel()
? Html::activeTextInput($this->model, $this->attribute, $options)
: Html::textInput($this->name, $this->value, $option... | php | {
"resource": ""
} |
q249161 | Unzip.openZipFile | validation | private function openZipFile($zipFile)
{
$zipArchive = new \ZipArchive;
if ($zipArchive->open($zipFile) !== true) {
throw new \Exception('Error opening '.$zipFile);
}
return $zipArchive;
} | php | {
"resource": ""
} |
q249162 | Unzip.extractFilenames | validation | private function extractFilenames(\ZipArchive $zipArchive)
{
$filenames = array();
$fileCount = $zipArchive->numFiles;
for ($i = 0; $i < $fileCount; $i++) {
if (($filename = $this->extractFilename($zipArchive, $i)) !== false) {
$filenames[] = $filename;
... | php | {
"resource": ""
} |
q249163 | Unzip.isValidPath | validation | private function isValidPath($path)
{
$pathParts = explode('/', $path);
if (!strncmp($path, '/', 1) ||
array_search('..', $pathParts) !== false ||
strpos($path, ':') !== false)
{
return false;
}
return true;
} | php | {
"resource": ""
} |
q249164 | Unzip.extractFilename | validation | private function extractFilename(\ZipArchive $zipArchive, $fileIndex)
{
$entry = $zipArchive->statIndex($fileIndex);
// convert Windows directory separator to Unix style
$filename = str_replace('\\', '/', $entry['name']);
if ($this->isValidPath($filename)) {
return $fi... | php | {
"resource": ""
} |
q249165 | Unzip.extract | validation | public function extract($zipFile, $targetPath)
{
$zipArchive = $this->openZipFile($zipFile);
$targetPath = $this->fixPath($targetPath);
$filenames = $this->extractFilenames($zipArchive);
if ($zipArchive->extractTo($targetPath, $filenames) === false) {
throw new \Excepti... | php | {
"resource": ""
} |
q249166 | Assetter.registerPlugin | validation | public function registerPlugin(PluginInterface $plugin)
{
$plugin->register($this);
$this->plugins[] = $plugin;
return $this;
} | php | {
"resource": ""
} |
q249167 | Assetter.fireEvent | validation | public function fireEvent($event, array $args = [])
{
if(isset($this->eventListeners[$event]) === false)
return $args;
foreach($this->eventListeners[$event] as $listener)
call_user_func_array($listener, $args);
return $args;
} | php | {
"resource": ""
} |
q249168 | Assetter.registerNamespace | validation | public function registerNamespace($ns, $def)
{
list($ns, $def) = $this->fireEvent('namespace.register', [ $ns, $def ]);
$this->namespaces[$ns] = $def;
return $this;
} | php | {
"resource": ""
} |
q249169 | Assetter.unregisterNamespace | validation | public function unregisterNamespace($ns)
{
list($ns) = $this->fireEvent('namespace.unregister', [ $ns ]);
unset($this->namespaces[$ns]);
return $this;
} | php | {
"resource": ""
} |
q249170 | Assetter.setDefaultGroup | validation | public function setDefaultGroup($defaultGroup)
{
list($defaultGroup) = $this->fireEvent('default-group.set', [ $defaultGroup ]);
$this->defaultGroup = $defaultGroup;
return $this;
} | php | {
"resource": ""
} |
q249171 | Assetter.setCollection | validation | public function setCollection(array $collection)
{
list($collection) = $this->fireEvent('collection.set', [ $collection ]);
$this->collection = [];
foreach($collection as $asset)
{
$this->appendToCollection($asset);
}
return $this;
} | php | {
"resource": ""
} |
q249172 | Assetter.appendToCollection | validation | public function appendToCollection(array $data)
{
list($data) = $this->fireEvent('append-to-collection', [ $data ]);
$files = [];
if(isset($data['files']['js']) && is_array($data['files']['js']))
$files['js'] = $this->resolveFilesList($data['files']['js'], isset($data['revision... | php | {
"resource": ""
} |
q249173 | Assetter.load | validation | public function load($data)
{
list($data) = $this->fireEvent('load', [ $data ]);
if(is_array($data))
{
$this->loadFromArray($data);
}
else
{
$this->loadFromCollection($data);
}
return $this;
} | php | {
"resource": ""
} |
q249174 | Assetter.loadFromArray | validation | public function loadFromArray(array $data)
{
list($data) = $this->fireEvent('load-from-array', [ $data ]);
$files = [];
if(isset($data['files']['js']) && is_array($data['files']['js']))
$files['js'] = $this->resolveFilesList($data['files']['js'], isset($data['revision']) ? $dat... | php | {
"resource": ""
} |
q249175 | Assetter.alreadyLoaded | validation | public function alreadyLoaded($name)
{
foreach($this->loaded as $item)
{
if($item['name'] === $name)
{
return true;
}
}
return false;
} | php | {
"resource": ""
} |
q249176 | Sms.send | validation | public function send($from, $to, $msg)
{
$opt = array(
'sender' => $from,
'receivers' => array($to),
'message' => $msg
);
return $this->createJob($opt);
} | php | {
"resource": ""
} |
q249177 | Sms.getSeeOffers | validation | public function getSeeOffers($countryDestination, $countryCurrencyPrice, $quantity)
{
return json_decode(self::getClient()->getSeeOffers($this->domain, $countryDestination, $countryCurrencyPrice, $quantity));
} | php | {
"resource": ""
} |
q249178 | ServerClient.createBackupFTPAccess | validation | public function createBackupFTPAccess($domain, $ipBlock)
{
// $domain = (string)$domain;
// $ipBlock= (string)$ipBlock;
if (!$domain)
throw new BadMethodCallException('Parameter $domain is missing.');
if (!$ipBlock)
throw new BadMethodCallException('Parameter $ipBlock is missing.');
$payload = array(
... | php | {
"resource": ""
} |
q249179 | ServerClient.getBackupFTPaccessBlock | validation | public function getBackupFTPaccessBlock($domain,$ipBlock)
{
$domain = (string)$domain;
if (!$domain)
throw new BadMethodCallException('Parameter $domain is missing.');
if (!$ipBlock)
throw new BadMethodCallException('Parameter $ipBlock is missing.');
try {
$r = $this->get('dedicated/ser... | php | {
"resource": ""
} |
q249180 | ServerClient.deleteBackupFTPaccessBlock | validation | public function deleteBackupFTPaccessBlock($domain,$ipBlock)
{
$domain = (string)$domain;
if (!$domain)
throw new BadMethodCallException('Parameter $domain is missing.');
if (!$ipBlock)
throw new BadMethodCallException('Parameter $ipBlock is missing.');
try {
$r = $this->delete('dedicat... | php | {
"resource": ""
} |
q249181 | ServerClient.setBackupFTPaccessBlock | validation | public function setBackupFTPaccessBlock($domain,$ipBlock, $ftp, $nfs, $cifs)
{
$domain = (string)$domain;
if (!$domain)
throw new BadMethodCallException('Parameter $domain is missing.');
if (!$ipBlock)
throw new BadMethodCallException('Parameter $ipBlock is missing.');
if (!$ftp)
throw new BadMethodCa... | php | {
"resource": ""
} |
q249182 | ServerClient.setBootDevice | validation | public function setBootDevice($domain, $currentState, $bootDevice)
{
//var_dump($currentState);
if (!$domain)
throw new BadMethodCallException('Parameter $domain is missing.');
$domain = (string)$domain;
if (!$bootDevice)
throw new BadMethodCallException('Parameter $... | php | {
"resource": ""
} |
q249183 | ServerClient.addSecondaryDnsDomains | validation | public function addSecondaryDnsDomains($domain, $domain2add, $ip){
$domain = (string)$domain;
if (!$domain)
throw new BadMethodCallException('Parameter $domain is missing.');
$domain2add = (string)$domain2add;
if (!$domain2add)
throw new BadMethodCallException('Pa... | php | {
"resource": ""
} |
q249184 | ServerClient.deleteSecondaryDnsDomains | validation | public function deleteSecondaryDnsDomains($domain, $domain2delete){
$domain = (string)$domain;
if (!$domain)
throw new BadMethodCallException('Parameter $domain is missing.');
$domain2delete = (string)$domain2delete;
if (!$domain2delete)
throw new BadMethodCallExc... | php | {
"resource": ""
} |
q249185 | XdslClient.ipGetRange | validation | public function ipGetRange($id, $ip)
{
if (!$id)
throw new BadMethodCallException('Missing parameter $id.');
if (!$ip)
throw new BadMethodCallException('Missing parameter $ip.');
return json_decode($this->getIpProperties($id, $ip))->range;
} | php | {
"resource": ""
} |
q249186 | XdslClient.ipDeleteMonitoringNotification | validation | public function ipDeleteMonitoringNotification($id, $ip, $notificationId)
{
if (!$id)
throw new BadMethodCallException('Missing parameter $id.');
if (!$ip)
throw new BadMethodCallException('Missing parameter $ip.');
if (!$notificationId)
throw new BadMetho... | php | {
"resource": ""
} |
q249187 | XdslClient.getLineProperties | validation | public function getLineProperties($id, $line)
{
if (!$id)
throw new BadMethodCallException('Missing parameter $id.');
if (!$line)
throw new BadMethodCallException('Missing parameter $line.');
try {
$r = $this->get('xdsl/' . $id . '/lines/' . $line)->send()... | php | {
"resource": ""
} |
q249188 | XdslClient.lineResetDslamPort | validation | public function lineResetDslamPort($id, $line)
{
if (!$id)
throw new BadMethodCallException('Missing parameter $id.');
if (!$line)
throw new BadMethodCallException('Missing parameter $line.');
try {
$r = $this->post('xdsl/' . $id . '/lines/' . $line . '/re... | php | {
"resource": ""
} |
q249189 | XdslClient.getPppLoginByMail | validation | public function getPppLoginByMail($id){
if (!$id)
throw new BadMethodCallException('Missing parameter $id.');
try {
$this->post('xdsl/' . $id . '/requestPPPLoginMail')->send();
} catch (\Exception $e) {
throw new XdslException($e->getMessage(), $e->getCode(), ... | php | {
"resource": ""
} |
q249190 | Cdn.updateDomainProperties | validation | public function updateDomainProperties($domain, $properties)
{
self::getClient()->updateDomainProperties($this->sn, $domain, $properties);
} | php | {
"resource": ""
} |
q249191 | Cdn.orderBackend | validation | public function orderBackend($nbBackend, $duration)
{
return json_decode(self::getClient()->orderBackend($this->sn, $nbBackend, $duration));
} | php | {
"resource": ""
} |
q249192 | Cdn.orderCacheRule | validation | public function orderCacheRule($nbCacheRule, $duration)
{
return json_decode(self::getClient()->orderCacheRule($this->sn, $nbCacheRule, $duration));
} | php | {
"resource": ""
} |
q249193 | IPClient.setReverseProperties | validation | public function setReverseProperties($ipblock,$ip,$reverse)
{
if (!$ipblock)
throw new BadMethodCallException('Parameter $ipblock is missing.');
if (!$ip)
throw new BadMethodCallException('Parameter $ip is missing.');
// if (!$reverse)
// throw new BadMethodCallException('Parameter $reverse is missing.... | php | {
"resource": ""
} |
q249194 | IPClient.getSpam | validation | public function getSpam($ipblock, $spamstate)
{
if (!$ipblock)
throw new BadMethodCallException('Parameter $ipblock is missing.');
if (!$spamstate)
throw new BadMethodCallException('Parameter $spamstate is missing.');
switch ($spamstate) {
case "blockedForSpam":
case "unblocked":
case "unblocki... | php | {
"resource": ""
} |
q249195 | IPClient.getSpamStats | validation | public function getSpamStats($ipblock, $spamstate, $fromdate, $todate)
{
if (!$ipblock)
throw new BadMethodCallException('Parameter $ipblock is missing.');
if (!$ipv4)
throw new BadMethodCallException('Parameter $ipv4 is missing.');
if (!$fromdate)
throw new BadMethodCallException('Parameter $fromdat... | php | {
"resource": ""
} |
q249196 | IPClient.setUnblockSpam | validation | public function setUnblockSpam($ipblock,$ipv4)
{
if (!$ipblock)
throw new BadMethodCallException('Parameter $ipblock is missing.');
if (!$ipv4)
throw new BadMethodCallException('Parameter $ipv4 is missing.');
try {
$r = $this->post('ip/' . urlencode($ipblock) . '/spam/' . $ipv4 .'/u... | php | {
"resource": ""
} |
q249197 | Telephony.getBillingAccountServices | validation | public function getBillingAccountServices()
{
$serviceList = json_decode(self::getClient()->getBillingAccountServices($this->billingAccount));
$services = array();
foreach ($serviceList as $service)
{
$services[] = new TelephonyAccountService($service, $this);
}
return $servic... | php | {
"resource": ""
} |
q249198 | Xdsl.getProperties | validation | public function getProperties()
{
$this->properties = json_decode(self::getClient()->getProperties($this->id));
return $this->properties;
} | php | {
"resource": ""
} |
q249199 | Xdsl.isIpv6Enabled | validation | public function isIpv6Enabled($forceReload = false)
{
if (!$this->properties || $forceReload)
$this->getProperties();
return $this->properties->ipv6Enabled;
} | php | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.