_id stringlengths 2 7 | title stringlengths 3 151 | partition stringclasses 3
values | text stringlengths 83 13k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q6000 | JBDump.timestamp | train | public static function timestamp($timestamp = null)
{
if (!self::isDebug()) {
return false;
}
$date = date(DATE_RFC822, $timestamp);
return self::i()->dump($date, $timestamp . ' sec = ');
} | php | {
"resource": ""
} |
q6001 | JBDump.locale | train | public static function locale()
{
if (!self::isDebug()) {
return false;
}
ob_start();
@system('locale -a');
$locale = explode(PHP_EOL, trim(ob_get_contents()));
ob_end_clean();
$result = array(
'list' => $locale,
... | php | {
"resource": ""
} |
q6002 | JBDump.timezone | train | public static function timezone()
{
if (!self::isDebug()) {
return false;
}
$data = date_default_timezone_get();
return self::i()->dump($data, '! timezone !');
} | php | {
"resource": ""
} |
q6003 | JBDump.print_r | train | public static function print_r($var, $varname = '...', $params = array())
{
if (!self::isDebug()) {
return false;
}
$output = print_r($var, true);
$_this = self::i();
$_this->_dumpRenderHtml($output, $varname, $params);
return $_this;
} | php | {
"resource": ""
} |
q6004 | JBDump.phpArray | train | public static function phpArray($var, $varname = 'varName', $isReturn = false)
{
if (!self::isDebug()) {
return false;
}
$output = JBDump_array2php::toString($var, $varname);
if ($isReturn) {
return $output;
}
$_this = self::i();
... | php | {
"resource": ""
} |
q6005 | JBDump.var_dump | train | public static function var_dump($var, $varname = '...', $params = array())
{
if (!self::isDebug()) {
return false;
}
// var_dump the variable into a buffer and keep the output
ob_start();
var_dump($var);
$output = ob_get_clean();
$_this ... | php | {
"resource": ""
} |
q6006 | JBDump.trace | train | public static function trace($trace = null, $addObject = false)
{
if (!self::isDebug()) {
return false;
}
$_this = self::i();
$trace = $trace ? $trace : debug_backtrace($addObject);
unset($trace[0]);
$result = $_this->convertTrace($trace, $ad... | php | {
"resource": ""
} |
q6007 | JBDump.extInfo | train | public static function extInfo($extensionName)
{
$result = self::_getExtension($extensionName);
if ($result) {
$extensionName = $result['name'];
}
return self::i()->dump($result, '! extension (' . $extensionName . ') !');
} | php | {
"resource": ""
} |
q6008 | JBDump.pathInfo | train | public static function pathInfo($file)
{
$result = self::_pathInfo($file);
return self::i()->dump($result, '! pathInfo (' . $file . ') !');
} | php | {
"resource": ""
} |
q6009 | JBDump.funcInfo | train | public static function funcInfo($functionName)
{
$result = self::_getFunction($functionName);
if ($result) {
$functionName = $result['name'];
}
return self::i()->dump($result, '! function (' . $functionName . ') !');
} | php | {
"resource": ""
} |
q6010 | JBDump.microtime | train | public static function microtime()
{
$_this = self::i();
if (!$_this->isDebug()) {
return false;
}
$data = $_this->_microtime();
return $_this->dump($data, '! current microtime !');
} | php | {
"resource": ""
} |
q6011 | JBDump.mark | train | public static function mark($label = '')
{
$_this = self::i();
if (!$_this->isDebug()) {
return false;
}
$current = $_this->_microtime() - $_this->_start;
$memory = self::_getMemory();
$trace = debug_backtrace();
$markInfo = array(
... | php | {
"resource": ""
} |
q6012 | JBDump.profiler | train | public function profiler($mode = 1)
{
if ($this->isDebug() && count($this->_bufferInfo) > 2 && $mode) {
$mode = (int)$mode;
if ($mode && self::isAjax()) {
if ($mode & self::PROFILER_RENDER_TOTAL) {
$this->_profilerRenderTotal();
... | php | {
"resource": ""
} |
q6013 | JBDump._profilerFormatMemory | train | protected static function _profilerFormatMemory($memoryBytes, $addMeasure = false)
{
$bytes = round($memoryBytes / 1024 / 1024, 3);
if ($addMeasure) {
$bytes .= ' MB';
}
return $bytes;
} | php | {
"resource": ""
} |
q6014 | JBDump._profilerFormatTime | train | protected static function _profilerFormatTime($time, $addMeasure = false, $round = 0)
{
$time = round($time * 1000, $round);
if ($addMeasure) {
$time .= ' ms';
}
return $time;
} | php | {
"resource": ""
} |
q6015 | JBDump._profilerFormatMark | train | protected static function _profilerFormatMark(array $mark)
{
return sprintf("%0.3f sec (+%.3f); %0.3f MB (%s%0.3f) - %s",
(float)$mark['time'],
(float)$mark['timeDiff'],
($mark['memory'] / 1024 / 1024),
($mark['memoryDiff'] / 1024 / 1024 >= 0) ? '+' : ''... | php | {
"resource": ""
} |
q6016 | JBDump._profilerRenderTotal | train | protected function _profilerRenderTotal()
{
reset($this->_bufferInfo);
$first = current($this->_bufferInfo);
$last = end($this->_bufferInfo);
$memoryPeak = memory_get_peak_usage(true);
$memoryDeltas = $timeDeltas = array();
foreach ($this->_bufferI... | php | {
"resource": ""
} |
q6017 | JBDump._profilerRenderFile | train | protected function _profilerRenderFile()
{
$this->log('-------------------------------------------------------', 'Profiler start');
foreach ($this->_bufferInfo as $key => $mark) {
$this->log(self::_profilerFormatMark($mark));
}
$this->log('--------------------------... | php | {
"resource": ""
} |
q6018 | JBDump._profilerRenderEcho | train | protected function _profilerRenderEcho()
{
$output = PHP_EOL;
foreach ($this->_bufferInfo as $key => $mark) {
$output .= "\t" . self::_profilerFormatMark($mark) . PHP_EOL;
}
$this->_dumpRenderLite($output, '! profiler !');
} | php | {
"resource": ""
} |
q6019 | JBDump._dumpRenderHtml | train | protected function _dumpRenderHtml($data, $varname = '...', $params = array())
{
$this->_currentDepth = 0;
$this->_initAssets();
if (isset($params['trace'])) {
$this->_trace = $params['trace'];
} else {
$this->_trace = debug_backtrace();
}
... | php | {
"resource": ""
} |
q6020 | JBDump._dumpRenderLite | train | protected function _dumpRenderLite($data, $varname = '...', $params = array())
{
if (is_bool($data)) {
$data = $data ? 'TRUE' : 'FALSE';
} elseif (is_null($data)) {
$data = 'NULL';
}
if (is_string($data) && strlen($data) == 0) {
$printrOu... | php | {
"resource": ""
} |
q6021 | JBDump.hash | train | public static function hash($data)
{
$result = array();
foreach (hash_algos() as $algoritm) {
$result[$algoritm] = hash($algoritm, $data, false);
}
return self::i()->dump($result, '! hash !');
} | php | {
"resource": ""
} |
q6022 | JBDump._getMemory | train | protected static function _getMemory()
{
if (function_exists('memory_get_usage')) {
return memory_get_usage();
} else {
$output = array();
$pid = getmypid();
if (substr(PHP_OS, 0, 3) == 'WIN') {
@exec('tasklist /FI "PID eq ... | php | {
"resource": ""
} |
q6023 | JBDump._dump | train | protected function _dump($data, $name = '...')
{
$varType = strtolower(getType($data));
$advType = false;
if ($varType == 'string' && preg_match('#(.*)::(.*)#', $name, $matches)) {
$matches[2] = trim(strToLower($matches[2]));
if ($this->_strlen($matches[2]) > ... | php | {
"resource": ""
} |
q6024 | JBDump._vars | train | protected function _vars($data, $isExpanded = false)
{
$_is_object = is_object($data);
?>
<div class="jbnest" style="<?php echo $isExpanded ? 'display:block' : 'display:none'; ?>">
<ul class="jbnode">
<?php
$keys = ($_is_object) ? array_ke... | php | {
"resource": ""
} |
q6025 | JBDump._resource | train | protected function _resource($data, $name)
{
$data = get_resource_type($data);
$this->_renderNode('Resource', $name, $data);
} | php | {
"resource": ""
} |
q6026 | JBDump._strlen | train | protected function _strlen($string)
{
$encoding = function_exists('mb_detect_encoding') ? mb_detect_encoding($string) : false;
return $encoding ? mb_strlen($string, $encoding) : strlen($string);
} | php | {
"resource": ""
} |
q6027 | JBDump._string | train | protected function _string($data, $name, $advType = '')
{
$dataLength = $this->_strlen($data);
$_extra = false;
if ($advType == 'html') {
$_extra = true;
$_ = 'HTML Code';
$data = '<pre class="jbpreview">' . $data . '</pre>';
} e... | php | {
"resource": ""
} |
q6028 | JBDump._array | train | protected function _array(array $data, $name)
{
$isExpanded = $this->_isExpandedLevel();
if (0 === strpos($name, '<! methods of "')) {
$isExpanded = false;
}
?>
<li class="jbchild">
<div
class="jbelement<?php ech... | php | {
"resource": ""
} |
q6029 | JBDump._object | train | protected function _object($data, $name)
{
static $objectIdList = array();
$objectId = spl_object_hash($data);
if (!isset($objectIdList[$objectId])) {
$objectIdList[$objectId] = count($objectIdList);
}
$count = count(@get_... | php | {
"resource": ""
} |
q6030 | JBDump._closure | train | protected function _closure($data, $name)
{
$isExpanded = $this->_isExpandedLevel();
?>
<li class="jbchild">
<div
class="jbelement<?php echo count((array)$data) > 0 ? ' jbexpand' : ''; ?> <?= $isExpanded ? 'jbopened' : ''; ?>"
<?php if (co... | php | {
"resource": ""
} |
q6031 | JBDump._renderNode | train | protected function _renderNode($type, $name, $data)
{
$typeAlias = str_replace(' ', '-', strtolower($type));
?>
<li class="jbchild">
<div class="jbelement">
<span class="jbname"><?php echo $name; ?></span>
(<span class="jbtype jbtype-<?php e... | php | {
"resource": ""
} |
q6032 | JBDump.getClientIP | train | public static function getClientIP($getSource = false)
{
if (!empty($_SERVER['HTTP_CLIENT_IP'])) {
$ip = $_SERVER['HTTP_CLIENT_IP'];
$source = 'HTTP_CLIENT_IP';
} elseif (!empty($_SERVER['HTTP_X_REAL_IP'])) {
$ip = $_SERVER['HTTP_X_REAL_IP'];
... | php | {
"resource": ""
} |
q6033 | JBDump._getRalativePath | train | protected function _getRalativePath($path)
{
if ($path) {
$rootPath = str_replace(array('/', '\\'), '/', self::$_config['root']);
$path = str_replace(array('/', '\\'), '/', $path);
$path = str_replace($rootPath, '/', $path);
$path = str_replace('//', '... | php | {
"resource": ""
} |
q6034 | JBDump._getOneTrace | train | protected function _getOneTrace($info, $addObject = false)
{
$_this = self::i();
$_tmp = array();
if (isset($info['file'])) {
$_tmp['file'] = $_this->_getRalativePath($info['file']) . ' : ' . $info['line'];
} else {
$info['file'] = false;
}
... | php | {
"resource": ""
} |
q6035 | JBDump._formatSize | train | protected static function _formatSize($bytes)
{
$exp = 0;
$value = 0;
$symbol = array('B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB');
if ($bytes > 0) {
$exp = floor(log($bytes) / log(1024));
$value = ($bytes / pow(1024, floor($exp)));
... | php | {
"resource": ""
} |
q6036 | JBDump._getSourceFunction | train | protected function _getSourceFunction($trace)
{
$lastTrace = $this->_getLastTrace($trace);
if (isset($lastTrace['function']) || isset($lastTrace['class'])) {
$args = '';
if (isset($lastTrace['args'])) {
$args = '( ' . count($lastTrace['args']) . ' ar... | php | {
"resource": ""
} |
q6037 | JBDump._getSourcePath | train | protected function _getSourcePath($trace, $fileOnly = false)
{
$path = '';
$currentTrace = $this->_getLastTrace($trace);
if (isset($currentTrace['file'])) {
$path = $this->_getRalativePath($currentTrace['file']);
if ($fileOnly && $path) {
... | php | {
"resource": ""
} |
q6038 | JBDump._getLastTrace | train | protected function _getLastTrace($trace)
{
// current filename info
$curFile = pathinfo(__FILE__, PATHINFO_BASENAME);
$curFileLength = $this->_strlen($curFile);
$meta = array();
$j = 0;
for ($i = 0; $trace && $i < sizeof($trace); $i++) {
... | php | {
"resource": ""
} |
q6039 | JBDump._getMethods | train | protected function _getMethods($object)
{
if (is_string($object)) {
$className = $object;
} else {
$className = get_class($object);
}
$methods = get_class_methods($className);
if (self::$_config['sort']['methods']) {
sort($method... | php | {
"resource": ""
} |
q6040 | JBDump.convertTrace | train | public function convertTrace($trace, $addObject = false)
{
$result = array();
if (is_array($trace)) {
foreach ($trace as $key => $info) {
$oneTrace = self::i()->_getOneTrace($info, $addObject);
$file = 'undefined';
if (isset($oneTr... | php | {
"resource": ""
} |
q6041 | JBDump._getErrorTypes | train | protected static function _getErrorTypes()
{
$errType = array(
E_ERROR => 'Error',
E_WARNING => 'Warning',
E_PARSE => 'Parsing Error',
E_NOTICE => 'Notice',
E_CORE_ERROR => 'Core Error',
... | php | {
"resource": ""
} |
q6042 | JBDump._errorHandler | train | function _errorHandler($errNo, $errMsg, $errFile, $errLine, $errCont)
{
$errType = $this->_getErrorTypes();
$errorMessage = $errType[$errNo] . "\t\"" . trim($errMsg) . "\"\t" . $errFile . ' ' . 'Line:' . $errLine;
if (self::$_config['errors']['logAll']) {
error_log('JBDu... | php | {
"resource": ""
} |
q6043 | JBDump.errors | train | public static function errors()
{
$result = array();
$result['error_reporting'] = error_reporting();
$errTypes = self::_getErrorTypes();
foreach ($errTypes as $errTypeKey => $errTypeName) {
if ($result['error_reporting'] & $errT... | php | {
"resource": ""
} |
q6044 | JBDump.isAjax | train | public static function isAjax()
{
if (isset($_SERVER['HTTP_X_REQUESTED_WITH'])
&& strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest'
) {
return true;
} elseif (self::isCli()) {
return true;
} elseif (function_exists('apac... | php | {
"resource": ""
} |
q6045 | JBDump.mail | train | public static function mail($text, $subject = null, $to = null)
{
if (!self::isDebug()) {
return false;
}
$_this = self::i();
if (empty($subject)) {
$subject = self::$_config['mail']['subject'];
}
if (empty($to)) {
$... | php | {
"resource": ""
} |
q6046 | JBDump.sql | train | public static function sql($query, $sqlName = 'SQL Query', $nl2br = false)
{
// Joomla hack
if (defined('_JEXEC')) {
$config = new JConfig();
$prefix = $config->dbprefix;
$query = str_replace('#__', $prefix, $query);
}
if (class_exists('... | php | {
"resource": ""
} |
q6047 | JBDump._jsonEncode | train | protected function _jsonEncode($in, $indent = 0)
{
$out = '';
foreach ($in as $key => $value) {
$out .= str_repeat(" ", $indent + 1);
$out .= json_encode((string)$key) . ': ';
if (is_object($value) || is_array($value)) {
$out .= $th... | php | {
"resource": ""
} |
q6048 | CustomerAddVatidTypo3.process | train | protected function process( array $stmts )
{
$this->msg( 'Adding "vatid" column to fe_users tables', 0 ); $this->status( '' );
foreach( $stmts as $table => $stmt )
{
$this->msg( sprintf( 'Checking "%1$s" table', $table ), 1 );
if( $this->schema->tableExists( $table ) === true
&& $this->schema->column... | php | {
"resource": ""
} |
q6049 | Util.getJson | train | public static function getJson($file, $assoc = true)
{
// @codeCoverageIgnoreStart
if (!extension_loaded('json')) {
throw new \Exception('The JSON extension is not loaded.');
}
// @codeCoverageIgnoreEnd
if (!file_exists($file)) {
throw new \InvalidArgu... | php | {
"resource": ""
} |
q6050 | LinkFactory.link | train | public function link($destination, array $params = array())
{
if (($pos = strrpos($destination, '#')) !== FALSE) {
$fragment = substr($destination, $pos);
$destination = substr($destination, 0, $pos);
} else {
$fragment = '';
}
if (strncmp($destination, '//', 2) === 0) {
$absoluteUrl = TRUE;
$d... | php | {
"resource": ""
} |
q6051 | Client.generateRequestHeaders | train | protected function generateRequestHeaders(
$verb,
$resourceType,
$resourceId,
$isQuery = false,
$contentLength = 0,
array $extraHeaders = []
){
$xMsDate = gmdate('D, d M Y H:i:s T');
$headers = [
'Accept: application/json',
'Use... | php | {
"resource": ""
} |
q6052 | Client.generateAuthHeader | train | private function generateAuthHeader($verb, $xMsDate, $resourceType, $resourceId)
{
$master = 'master';
$token = '1.0';
$key = base64_decode($this->key);
$stringToSign = strtolower($verb) . "\n" .
strtolower($resourceType) . "\n" .
$resourceId . "\n" .
... | php | {
"resource": ""
} |
q6053 | DataStore.getParent | train | public function getParent($id)
{
/** @var Statement $statement */
$dataItem = $this->get($id);
$queryBuilder = $this->driver->getSelectQueryBuilder();
$queryBuilder->andWhere($this->driver->getUniqueId() . " = " . $dataItem->getAttribute($this->getParentField()));
$statem... | php | {
"resource": ""
} |
q6054 | DataStore.save | train | public function save($item, $autoUpdate = true)
{
$result = null;
$this->allowSave = true;
if (isset($this->events[ self::EVENT_ON_BEFORE_SAVE ])) {
$this->secureEval($this->events[ self::EVENT_ON_BEFORE_SAVE ], array(
'item' => &$item
));
}
... | php | {
"resource": ""
} |
q6055 | DataStore.isOracle | train | public function isOracle()
{
static $r;
if (is_null($r)) {
$r = $this->driver->getPlatformName() == self::ORACLE_PLATFORM;
}
return $r;
} | php | {
"resource": ""
} |
q6056 | DataStore.isSqlite | train | public function isSqlite()
{
static $r;
if (is_null($r)) {
$r = $this->driver->getPlatformName() == self::SQLITE_PLATFORM;
}
return $r;
} | php | {
"resource": ""
} |
q6057 | DataStore.isPostgres | train | public function isPostgres()
{
static $r;
if (is_null($r)) {
$r = $this->driver->getPlatformName() == self::POSTGRESQL_PLATFORM;
}
return $r;
} | php | {
"resource": ""
} |
q6058 | DataStore.getTypes | train | public function getTypes()
{
$list = array();
$reflectionClass = new \ReflectionClass(__CLASS__);
foreach ($reflectionClass->getConstants() as $k => $v) {
if (strrpos($k, "_PLATFORM") > 0) {
$list[] = $v;
}
}
return $list;
... | php | {
"resource": ""
} |
q6059 | DataStore.getTroughMapping | train | public function getTroughMapping($mappingId, $id)
{
$config = $this->mapping[ $mappingId ];
$dataStoreService = $this->container->get("data.source");
$externalDataStore = $dataStoreService->get($config["externalDataStore"]);
$externalDriver = $externalDataStore->getDri... | php | {
"resource": ""
} |
q6060 | Typo3.deleteMultiple | train | public function deleteMultiple( $keys )
{
foreach( $keys as $key ) {
$this->object->remove( $this->prefix . $key );
}
} | php | {
"resource": ""
} |
q6061 | Typo3.deleteByTags | train | public function deleteByTags( array $tags )
{
foreach( $tags as $tag ) {
$this->object->flushByTag( $this->prefix . $tag );
}
} | php | {
"resource": ""
} |
q6062 | Typo3.clear | train | public function clear()
{
if( $this->prefix ) {
$this->object->flushByTag( $this->prefix . 'siteid' );
} else {
$this->object->flush();
}
} | php | {
"resource": ""
} |
q6063 | FileManager.getFile | train | public function getFile($file = null, $md5 = null)
{
//====================================================================//
// Stack Trace
Splash::log()->trace();
//====================================================================//
// PHPUNIT Exception => Look First in... | php | {
"resource": ""
} |
q6064 | FileManager.isFile | train | public function isFile($path = null, $md5 = null)
{
//====================================================================//
// Safety Checks
if (empty($path)) {
return Splash::log()->err("ErrFileFileMissing", __FUNCTION__);
}
if (empty(dirname($path))) {
... | php | {
"resource": ""
} |
q6065 | FileManager.readFile | train | public function readFile($path = null, $md5 = null)
{
//====================================================================//
// Safety Checks
if (empty($path)) {
return Splash::log()->err("ErrFileFileMissing", __FUNCTION__);
}
if (empty(dirname($path))) {
... | php | {
"resource": ""
} |
q6066 | FileManager.readFileContents | train | public function readFileContents($fileName = null)
{
//====================================================================//
// Safety Checks
if (empty($fileName)) {
return Splash::log()->err("ErrFileFileMissing");
}
//============================================... | php | {
"resource": ""
} |
q6067 | FileManager.writeFile | train | public function writeFile($dir = null, $file = null, $md5 = null, $raw = null)
{
//====================================================================//
// Safety Checks
if (!$this->isWriteValidInputs($dir, $file, $md5, $raw)) {
return false;
}
//================... | php | {
"resource": ""
} |
q6068 | FileManager.deleteFile | train | public function deleteFile($path = null, $md5 = null)
{
$fPath = (string) $path;
//====================================================================//
// Safety Checks
if (empty(dirname($fPath))) {
return Splash::log()->err("ErrFileDirMissing", __FUNCTION__);
}... | php | {
"resource": ""
} |
q6069 | FileManager.isWriteValidInputs | train | private function isWriteValidInputs($dir = null, $file = null, $md5 = null, $raw = null)
{
//====================================================================//
// Safety Checks
if (empty($dir)) {
return Splash::log()->err("ErrFileDirMissing", __FUNCTION__);
}
... | php | {
"resource": ""
} |
q6070 | CreateCardRefQuery.checkPaymentTransactionStatus | train | protected function checkPaymentTransactionStatus(PaymentTransaction $paymentTransaction)
{
if (!$paymentTransaction->isFinished())
{
throw new ValidationException('Only finished payment transaction can be used for create-card-ref-id');
}
if (!$paymentTransaction->getPaym... | php | {
"resource": ""
} |
q6071 | GatewayClient.parseReponse | train | protected function parseReponse($response)
{
if(empty($response))
{
throw new ResponseException('PaynetEasy response is empty');
}
$responseFields = array();
parse_str($response, $responseFields);
return new Response($responseFields);
} | php | {
"resource": ""
} |
q6072 | GatewayClient.getUrl | train | protected function getUrl(Request $request)
{
if (strpos($request->getApiMethod(), 'sync-') === 0)
{
$apiMethod = 'sync/' . substr($request->getApiMethod(), strlen('sync-'));
}
else
{
$apiMethod = $request->getApiMethod();
}
if (strlen... | php | {
"resource": ""
} |
q6073 | TokenGenerator.generateToken | train | public function generateToken($token_length=30, $prefix='') {
$token_length = $token_length - strlen($prefix);
if ($token_length < 0) { throw new Exception("Prefix is too long", 1); }
$token = "";
while (($len = strlen($token)) < $token_length) {
$remaining_len = $to... | php | {
"resource": ""
} |
q6074 | Validator.validateByRule | train | static public function validateByRule($value, $rule, $failOnError = true)
{
$valid = false;
switch ($rule)
{
case self::EMAIL:
{
$valid = filter_var($value, FILTER_VALIDATE_EMAIL);
break;
}
case self::IP:
... | php | {
"resource": ""
} |
q6075 | FieldsFactory.create | train | public function create($fieldType, $fieldId = null, $fieldName = null)
{
//====================================================================//
// Commit Last Created if not already done
if (!empty($this->new)) {
$this->commit();
}
//============================... | php | {
"resource": ""
} |
q6076 | FieldsFactory.identifier | train | public function identifier($fieldId)
{
//====================================================================//
// Safety Checks ==> Verify a new Field Exists
if (empty($this->new)) {
Splash::log()->err("ErrFieldsNoNew");
} else {
//===========================... | php | {
"resource": ""
} |
q6077 | FieldsFactory.inList | train | public function inList($listName)
{
//====================================================================//
// Safety Checks ==> Verify List Name Not Empty
if (empty($listName)) {
return $this;
}
//================================================================... | php | {
"resource": ""
} |
q6078 | FieldsFactory.isReadOnly | train | public function isReadOnly($isReadOnly = true)
{
//====================================================================//
// Safety Checks ==> Verify a new Field Exists
if (empty($this->new)) {
Splash::log()->err("ErrFieldsNoNew");
} elseif ($isReadOnly) {
//=... | php | {
"resource": ""
} |
q6079 | FieldsFactory.isWriteOnly | train | public function isWriteOnly($isWriteOnly = true)
{
//====================================================================//
// Safety Checks ==> Verify a new Field Exists
if (empty($this->new)) {
Splash::log()->err("ErrFieldsNoNew");
} elseif ($isWriteOnly) {
... | php | {
"resource": ""
} |
q6080 | FieldsFactory.isRequired | train | public function isRequired($isRequired = true)
{
//====================================================================//
// Safety Checks ==> Verify a new Field Exists
if (empty($this->new)) {
Splash::log()->err("ErrFieldsNoNew");
} else {
//=================... | php | {
"resource": ""
} |
q6081 | FieldsFactory.setPreferRead | train | public function setPreferRead()
{
//====================================================================//
// Safety Checks ==> Verify a new Field Exists
if (empty($this->new)) {
Splash::log()->err("ErrFieldsNoNew");
} else {
//================================... | php | {
"resource": ""
} |
q6082 | FieldsFactory.setPreferWrite | train | public function setPreferWrite()
{
//====================================================================//
// Safety Checks ==> Verify a new Field Exists
if (empty($this->new)) {
Splash::log()->err("ErrFieldsNoNew");
} else {
//===============================... | php | {
"resource": ""
} |
q6083 | FieldsFactory.setPreferNone | train | public function setPreferNone()
{
//====================================================================//
// Safety Checks ==> Verify a new Field Exists
if (empty($this->new)) {
Splash::log()->err("ErrFieldsNoNew");
} else {
//================================... | php | {
"resource": ""
} |
q6084 | FieldsFactory.association | train | public function association()
{
//====================================================================//
// Safety Checks ==> Verify a new Field Exists
if (empty($this->new)) {
Splash::log()->err("ErrFieldsNoNew");
} else {
//==================================... | php | {
"resource": ""
} |
q6085 | FieldsFactory.isListed | train | public function isListed($isListed = true)
{
//====================================================================//
// Safety Checks ==> Verify a new Field Exists
if (empty($this->new)) {
Splash::log()->err("ErrFieldsNoNew");
} else {
//=====================... | php | {
"resource": ""
} |
q6086 | FieldsFactory.isLogged | train | public function isLogged($isLogged = true)
{
//====================================================================//
// Safety Checks ==> Verify a new Field Exists
if (empty($this->new)) {
Splash::log()->err("ErrFieldsNoNew");
} else {
//=====================... | php | {
"resource": ""
} |
q6087 | FieldsFactory.microData | train | public function microData($itemType, $itemProp)
{
//====================================================================//
// Safety Checks ==> Verify a new Field Exists
if (empty($this->new)) {
Splash::log()->err("ErrFieldsNoNew");
} else {
//================... | php | {
"resource": ""
} |
q6088 | FieldsFactory.addOptions | train | public function addOptions($fieldOptions)
{
foreach ($fieldOptions as $type => $value) {
$this->addOption($type, $value);
}
return $this;
} | php | {
"resource": ""
} |
q6089 | FieldsFactory.addOption | train | public function addOption($type, $value = true)
{
//====================================================================//
// Safety Checks ==> Verify a new Field Exists
if (empty($this->new)) {
Splash::log()->err("ErrFieldsNoNew");
} elseif (empty($type)) {
S... | php | {
"resource": ""
} |
q6090 | FieldsFactory.setDefaultLanguage | train | public function setDefaultLanguage($isoCode)
{
//====================================================================//
// Safety Checks ==> Verify Language ISO Code
if (!is_string($isoCode) || (strlen($isoCode) < 2)) {
Splash::log()->err("Default Language ISO Code is Invalid");
... | php | {
"resource": ""
} |
q6091 | FieldsFactory.setMultilang | train | public function setMultilang($isoCode)
{
//====================================================================//
// Safety Checks ==> Verify a new Field Exists
if (empty($this->new)) {
Splash::log()->err("ErrFieldsNoNew");
return $this;
}
//=========... | php | {
"resource": ""
} |
q6092 | FieldsFactory.seachtByTag | train | public function seachtByTag($fieldList, $fieldTag)
{
//====================================================================//
// Safety Checks
if (!count($fieldList)) {
return false;
}
if (empty($fieldTag)) {
return false;
}
//=========... | php | {
"resource": ""
} |
q6093 | FieldsFactory.seachtById | train | public function seachtById($fieldList, $fieldId)
{
//====================================================================//
// Safety Checks
if (!count($fieldList)) {
return false;
}
if (empty($fieldId)) {
return false;
}
//============... | php | {
"resource": ""
} |
q6094 | FieldsFactory.setTag | train | private function setTag($fieldTag)
{
//====================================================================//
// Safety Checks ==> Verify a new Field Exists
if (empty($this->new)) {
Splash::log()->err("ErrFieldsNoNew");
} else {
//=============================... | php | {
"resource": ""
} |
q6095 | FieldsFactory.validate | train | private function validate($field)
{
//====================================================================//
// Verify - Field Type is Not Empty
if (empty($field->type) || !is_string($field->type)) {
return Splash::log()->err("ErrFieldsNoType");
}
//==============... | php | {
"resource": ""
} |
q6096 | ContactController.postSubmit | train | public function postSubmit()
{
$rules = [
'first_name' => 'required',
'last_name' => 'required',
'email' => 'required',
'message' => 'required',
];
$input = Binput::only(array_keys($rules));
$val = Validator::make($input, $ru... | php | {
"resource": ""
} |
q6097 | PHPMailer.EncodeString | train | public function EncodeString($str, $encoding = 'base64')
{
$encoded = '';
switch (strtolower($encoding)) {
case 'base64':
$encoded = chunk_split(base64_encode($str), 76, $this->LE);
break;
case '7bit':
case '8bit':
$... | php | {
"resource": ""
} |
q6098 | PHPMailer._mime_types | train | public static function _mime_types($ext = '')
{
$mimes = array(
'hqx' => 'application/mac-binhex40',
'cpt' => 'application/mac-compactpro',
'doc' => 'application/msword',
'bin' => 'application/macbinary',
'dms' => 'application/octet-strea... | php | {
"resource": ""
} |
q6099 | SMTP.StartTLS | train | public function StartTLS()
{
$this->error = null; # to avoid confusion
if (!$this->connected()) {
$this->error = array("error" => "Called StartTLS() without being connected");
return false;
}
fputs($this->smtp_conn, "STARTTLS" . $this->CRLF);
$rply ... | php | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.