undocumented function

@return void
@author
11582
public static function getLikeViewData($itemId)
    {
		$totalCount = TotalLike::where('item_id', $itemId)->first();
		if($totalCount == NULL) {
			$totalCount = new TotalLike;
			$totalCount->item_id = $itemId;
			$totalCount->total_like = 0;
			$totalCount->total_dislike = 0;

			$totalCount->save();
		}

		$yourVote = 0; // 0 = Not voted, 1 = Liked, -1 = Disliked
		if (Auth::check()) {
			$checkYourVote = \risul\LaravelLikeComment\Models\Like::where([
																	'user_id' => Auth::user()->id,
																	'item_id' => $itemId
																	])->first();
			if ($checkYourVote != NULL) {
				$yourVote = $checkYourVote->vote;
			}
		}

		$likeDisabled = "";
		if (!Auth::check()) {
			$likeDisabled = "disabled";
		}

		$likeIconOutlined = $yourVote == 1 ? "" : "outline";
		$dislikeIconOutlined = $yourVote == -1 ? "" : "outline";

		return [
			$itemId.'likeDisabled' => $likeDisabled,
			$itemId.'likeIconOutlined' => $likeIconOutlined,
			$itemId.'dislikeIconOutlined' => $dislikeIconOutlined,
			$itemId.'total_like' => $totalCount->total_like,
			$itemId.'total_dislike' => $totalCount->total_dislike,
		];
    }
1287062
function _func()
    {
        $num_args = 0; // number of arguments received
        $function = strtoupper($this->_current_token);
        $result   = ''; // initialize result
        $this->_advance();
        $this->_advance();         // eat the "("
        while ($this->_current_token != ')') {
        /**/
            if ($num_args > 0) {
                if ($this->_current_token == SPREADSHEET_EXCEL_WRITER_COMA or
                    $this->_current_token == SPREADSHEET_EXCEL_WRITER_SEMICOLON)
                {
                    $this->_advance();  // eat the "," or ";"
                } else {
                    return $this->raiseError("Syntax error: comma expected in ".
                                      "function $function, arg #{$num_args}");
                }
                $result2 = $this->_condition();
                if (PEAR::isError($result2)) {
                    return $result2;
                }
                $result = $this->_createTree('arg', $result, $result2);
            } else { // first argument
                $result2 = $this->_condition();
                if (PEAR::isError($result2)) {
                    return $result2;
                }
                $result = $this->_createTree('arg', '', $result2);
            }
            $num_args++;
        }
        if (!isset($this->_functions[$function])) {
            return $this->raiseError("Function $function() doesn't exist");
        }
        $args = $this->_functions[$function][1];
        // If fixed number of args eg. TIME($i,$j,$k). Check that the number of args is valid.
        if (($args >= 0) and ($args != $num_args)) {
            return $this->raiseError("Incorrect number of arguments in function $function() ");
        }

        $result = $this->_createTree($function, $result, $num_args);
        $this->_advance();         // eat the ")"
        return $result;
    }
1356608
function(keysFunc, undefinedOnly) {
    return function(obj) {
      var length = arguments.length;
      if (length < 2 || obj === null) return obj;
      for (var index = 1; index < length; index++) {
        var source = arguments[index];
        var keys = keysFunc(source);
        var l = keys.length;

        for (var i = 0; i < l; i++) {
          var key = keys[i];
          if (!undefinedOnly || obj[key] === void 0) obj[key] = source[key];
        }
      }

      return obj;
    };
  }
888436
function doFunction( $name, $func_obj, $nspace, $current_nspace )
    {
        $func = $this->Functions[$name];
        if ( is_array( $func ) )
        {
            $this->loadAndRegisterFunctions( $this->Functions[$name] );
            $func = $this->Functions[$name];
        }
        if ( isset( $func ) and
             is_object( $func ) )
        {
            return $func->process( $this, $name, $func_obj, $nspace, $current_nspace );
        }
        else
        {
            $this->warning( "", "Function \"$name\" is not registered" );
            return false;
        }
    }
334087
protected function regexEncoding()
	{
		trigger_error('Function ' . __METHOD__ . ' not implemented yet');

		static $functionExists;

		if ($functionExists === null) {
			$functionExists = function_exists('\mb_regex_encoding');
		}

		if ($functionExists) {
			$args = func_get_args();
			return call_user_func_array('\mb_regex_encoding', $args);
		}
	}
1097674
protected function guessBelongsToManyRelation()
    {
        $caller = Arr::first(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS), function ($trace) {
            return !in_array($trace['function'], Model::$manyMethods);
        });

        return !is_null($caller) ? $caller['function'] : null;
    }
112404
public function undismiss() {
		// Validate nonce.
		if ( isset( $_POST['set_key_auth'] ) && ! empty( $_POST['notice'] ) && check_ajax_referer( 'boldgrid_set_key', 'set_key_auth', false ) ) {
			$id = sanitize_key( $_POST['notice'] );

			// Get all of the notices this user has dismissed.
			$dismissals = get_user_meta( get_current_user_id(), 'boldgrid_dismissed_admin_notices' );

			// Loop through all of the dismissed notices. If we find the dismissal, then remove it.
			foreach ( $dismissals as $dismissal ) {
				if ( $id === $dismissal['id'] ) {
					delete_user_meta( get_current_user_id(), 'boldgrid_dismissed_admin_notices', $dismissal );
					break;
				}
			}
		}
	}
28143
public static function partial()
    {
        $args = func_get_args();
        $f = array_shift($args);
        return function () use ($f, $args) {
            return call_user_func_array($f, array_merge($args, func_get_args()));
        };
    }
635806
function extractFunction( &$text, $offSet, &$functionName, &$parameters, $type='ezCall' )
    {
        $offSet++;
        $offSet += strlen( $type.':' );
        $funcEnd = strpos( $text, ':', $offSet );
        if ( $funcEnd === false || strpos( $text, '>', $offSet ) < $funcEnd )
        {
            $funcEnd = strpos( $text, '>', $offSet );
        }
        $functionName = substr( $text, $offSet, $funcEnd - $offSet );

        return eZPDFTable::extractParameters( $text, $funcEnd, $parameters );
    }
1338780
public static function logDeprecatedFunction() {
		if (!$GLOBALS['TYPO3_CONF_VARS']['SYS']['enableDeprecationLog']) {
			return;
		}

			// This require_once is needed for deprecation calls
			// thrown early during bootstrap, if the autoloader is
			// not instantiated yet. This can happen for example if
			// ext_localconf triggers a deprecation.
		require_once __DIR__.'/class.t3lib_utility_debug.php';

		$trail = debug_backtrace();

		if ($trail[1]['type']) {
			$function = new ReflectionMethod($trail[1]['class'], $trail[1]['function']);
		} else {
			$function = new ReflectionFunction($trail[1]['function']);
		}

		$msg = '';
		if (preg_match('/@deprecated\s+(.*)/', $function->getDocComment(), $match)) {
			$msg = $match[1];
		}

			// trigger PHP error with a short message: <function> is deprecated (called from <source>, defined in <source>)
		$errorMsg = 'Function ' . $trail[1]['function'];
		if ($trail[1]['class']) {
			$errorMsg .= ' of class ' . $trail[1]['class'];
		}
		$errorMsg .= ' is deprecated (called from ' . $trail[1]['file'] . '#' . $trail[1]['line'] . ', defined in ' . $function->getFileName() . '#' . $function->getStartLine() . ')';

			// write a longer message to the deprecation log: <function> <annotion> - <trace> (<source>)
		$logMsg = $trail[1]['class'] . $trail[1]['type'] . $trail[1]['function'];
		$logMsg .= '() - ' . $msg.' - ' . t3lib_utility_Debug::debugTrail();
		$logMsg .= ' (' . substr($function->getFileName(), strlen(PATH_site)) . '#' . $function->getStartLine() . ')';
		self::deprecationLog($logMsg);
	}
1123716
public function compileFunction()
    {
        $params = func_get_args();
        $name = array_shift($params);
        array_pop($params);
        if (function_exists($name)) {
            return $name . '(' . join(', ', $params) . ')';
        }
    }
1203598
def undecorate(func):
    """"""
    orig_call_wrapper = lambda x: x
    for call_wrapper, unwrap in SUPPORTED_DECORATOR.items():
        if isinstance(func, call_wrapper):
            func = unwrap(func)
            orig_call_wrapper = call_wrapper
            break
    return orig_call_wrapper, func
900266
public function internalShutdownFunction()
    {
        $aError = error_get_last();
        if (! $this->aConfig['display_errors'] && is_array($aError) && $aError['type'] === E_ERROR) {
            $oException = new \ErrorException(
                $aError['message'],
                $this->aConfig['default_error_code'],
                $aError['type'],
                $aError['file'],
                $aError['line']
            );
            call_user_func($this->callbackGenericDisplay, $oException);
        }
        if (! empty($this->callbackAdditionalShutdownFct)) {
            call_user_func($this->callbackAdditionalShutdownFct);
            // @codeCoverageIgnoreStart
        }
    }
265353
static function p($n) {
		$r = null;  /** @var string|null $r */
		$types = [
			self::AE => function($n) {return !!preg_match("/^3$|^3[47][0-9]{0,13}$/i", $n);}
			,self::DN => function($n) {return !!preg_match("/^3(?:0[0-5]|[68][0-9])[0-9]{4,}$/i", $n);}
			,self::DS => function($n) {return !!preg_match(
				"/^6$|^6[05]$|^601[1]?$|^65[0-9][0-9]?$|^6(?:011|5[0-9]{2})[0-9]{0,12}$/i", $n
			);}
			,self::JC => function($n) {return !!preg_match("/^(?:2131|1800|35[0-9]{3})[0-9]{3,}$/i", $n);}
			,self::MC => function($n) {return !!preg_match(
				"/^5[1-5][0-9]{5,}|222[1-9][0-9]{3,}|22[3-9][0-9]{4,}|2[3-6][0-9]{5,}|27[01][0-9]{4,}|2720[0-9]{3,}$/i", $n
			);}
			,self::VI => function($n) {return !!preg_match("/^4[0-9]{0,15}$/i", $n);}
		];
		foreach ($types as $t => $f) { /** @var string $t */
			if ($f($n)) {
				$r = $t;
				break;
			}
		}
		return $r;
	}
902044
private function disabledFunctionCheck()
    {
        $functions = [
            'exec'
        ];
        // Functions needed by symfony process
        foreach($functions as $function){
            if (!function_exists($function)) {
                $this->console->error('Function  "'.$function.'" is required. Is it disabled in php.ini?');
                $this->errors = true;
            }
        }
    }
353711
protected function _functionNode()
    {
        $node = new FunctionDef();
        $token = $this->_stream->current(true);
        $parent = $this->_states['current'];

        $body = $token[1];
        $name = substr($this->_stream->next('('), 0, -1);
        $body .= $name;
        $node->name = trim($name);
        $args = $this->_parseArgs();
        $node->args = $args['args'];
        $body .= $args['body'] . $this->_stream->next([';', '{']);
        if ($parent) {
            $isMethod = $parent->hasMethods;
            if ($parent->type === 'interface') {
                $node->type = 'signature';
            }
        } else {
            $isMethod = false;
        }
        $node->isMethod = $isMethod;
        $node->isClosure = !$node->name;
        if ($isMethod) {
            $node->visibility = $this->_states['visibility'];
            $this->_states['visibility'] = [];
        }
        $node->body = $body;
        $this->_codeNode();
        $this->_states['body'] = $body;
        $this->_contextualize($node);

        // Looking for curly brackets only if not an "abstract function"
        if ($this->_stream->current() === '{') {
            $this->_states['current'] = $node;
        }

        return $node->function = $node;
    }
637607
public function edit()
    {
        if (!userHasPermission('admin:blog:post:' . $this->blog->id . ':edit')) {

            unauthorised();
        }

        // --------------------------------------------------------------------------

        //  Fetch and check post
        $iPostId = (int) $this->uri->segment(6);

        $this->data['post'] = $this->blog_post_model->getById($iPostId);

        if (!$this->data['post']) {

            show404();
        }

        // --------------------------------------------------------------------------

        //  Set method info
        $this->data['page']->title = 'Edit ' . $this->data['postName'] . ' &rsaquo; ' . $this->data['post']->title;

        // --------------------------------------------------------------------------

        //  Process POST
        if ($this->input->post()) {

            //  Are we running in preview mode?
            $bIsPreview = (bool) $this->input->post('isPreview');

            //  Only validate non-previews
            if (empty($bIsPreview)) {

                $oFormValidation = Factory::service('FormValidation');

                $oFormValidation->set_rules('is_published', '', '');
                $oFormValidation->set_rules('published', '', '');
                $oFormValidation->set_rules('title', '', 'required');
                $oFormValidation->set_rules('type', '', 'required');
                $oFormValidation->set_rules('body', '', 'required');
                $oFormValidation->set_rules('excerpt', '', '');
                $oFormValidation->set_rules('image_id', '', '');
                $oFormValidation->set_rules('video_url', '', '');
                $oFormValidation->set_rules('audio_url', '', '');
                $oFormValidation->set_rules('seo_keywords', '', '');

                if ($this->input->post('slug')) {

                    $sTable = $this->blog_post_model->getTableName();
                    $oFormValidation->set_rules(
                        'slug',
                        '',
                        'alpha_dash|unique_if_diff[' . $sTable . '.slug.' . $this->data['post']->slug . ']'
                    );
                }

                if ($this->input->post('type') === 'PHOTO') {

                    $oFormValidation->set_rules('image_id', '', 'required');

                } elseif ($this->input->post('type') === 'VIDEO') {

                    $oFormValidation->set_rules('video_url', '', 'required|callback_callbackValidVideoUrl');

                } elseif ($this->input->post('type') === 'AUDIO') {

                    $oFormValidation->set_rules('audio_url', '', 'required|callback_callbackValidAudioUrl');
                }

                $oFormValidation->set_message('required', lang('fv_required'));
                $oFormValidation->set_message('alpha_dash', lang('fv_alpha_dash'));
                $oFormValidation->set_message('unique_if_diff', 'A post using this slug already exists.');
            }

            if (!empty($bIsPreview) || $oFormValidation->run($this)) {

                //  Prepare data
                $aData                     = array();
                $aData['title']            = $this->input->post('title');
                $aData['type']             = $this->input->post('type');
                $aData['slug']             = $this->input->post('slug');
                $aData['excerpt']          = $this->input->post('excerpt');
                $aData['image_id']         = (int) $this->input->post('image_id');
                $aData['image_id']         = $aData['image_id'] ? $aData['image_id'] : null;
                $aData['video_url']        = trim($this->input->post('video_url'));
                $aData['video_url']        = $aData['video_url'] ? $aData['video_url'] : null;
                $aData['audio_url']        = trim($this->input->post('audio_url'));
                $aData['audio_url']        = $aData['audio_url'] ? $aData['audio_url'] : null;
                $aData['body']             = $this->input->post('body');
                $aData['seo_description']  = $this->input->post('seo_description');
                $aData['seo_keywords']     = $this->input->post('seo_keywords');
                $aData['is_published']     = (bool) $this->input->post('is_published');
                $aData['published']        = $this->input->post('published');
                $aData['associations']     = $this->input->post('associations');
                $aData['gallery']          = $this->input->post('gallery');
                $aData['comments_enabled'] = $this->input->post('comments_enabled');
                $aData['comments_expire']  = $this->input->post('comments_expire');

                if (appSetting('categories_enabled', 'blog-' . $this->blog->id)) {

                    $aData['categories'] = $this->input->post('categories');
                }

                if (appSetting('tags_enabled', 'blog-' . $this->blog->id)) {

                    $aData['tags'] = $this->input->post('tags');
                }

                //  Are we running in preview mode?
                if (!empty($bIsPreview)) {

                    //  Previewing, set the preview tables and create a new one
                    $aData['blog_id'] = $this->blog->id;
                    $this->blog_post_model->usePreviewTables(true);
                    $mResult = $this->blog_post_model->create($aData);

                } else {

                    //  Normal behaviour
                    $mResult = $this->blog_post_model->update($iPostId, $aData);
                }

                if (!empty($mResult)) {

                    //  Behave slightly differently depending on whether we're previewing or not
                    if (empty($bIsPreview)) {

                        //  Update admin change log
                        foreach ($aData as $field => $value) {

                            if (isset($this->data['post']->$field)) {

                                switch ($field) {

                                    case 'associations':

                                        //  @TODO: changelog associations
                                        break;

                                    case 'categories':

                                        $aOldCategories = array();
                                        $aNewCategories = array();

                                        foreach ($this->data['post']->$field as $v) {

                                            $aOldCategories[] = $v->label;
                                        }

                                        if (is_array($value)) {

                                            foreach ($value as $v) {

                                                $temp = $this->blog_category_model->getById($v);

                                                if ($temp) {

                                                    $aNewCategories[] = $temp->label;
                                                }
                                            }
                                        }

                                        asort($aOldCategories);
                                        asort($aNewCategories);

                                        $aOldCategories = implode(',', $aOldCategories);
                                        $aNewCategories = implode(',', $aNewCategories);

                                        $this->oChangeLogModel->add(
                                            'updated',
                                            'a',
                                            'blog post',
                                            $iPostId,
                                            $aData['title'],
                                            'admin/blog/post/create/' . $this->blog->id . '/' . $iPostId,
                                            $field,
                                            $aOldCategories,
                                            $aNewCategories,
                                            false
                                        );
                                        break;

                                    case 'tags':

                                        $aOldTags = array();
                                        $aNewTags = array();

                                        foreach ($this->data['post']->$field as $v) {

                                            $aOldTags[] = $v->label;
                                        }

                                        if (is_array($value)) {

                                            foreach ($value as $v) {

                                                $temp = $this->blog_tag_model->getById($v);

                                                if ($temp) {

                                                    $aNewTags[] = $temp->label;
                                                }
                                            }
                                        }

                                        asort($aOldTags);
                                        asort($aNewTags);

                                        $aOldTags = implode(',', $aOldTags);
                                        $aNewTags = implode(',', $aNewTags);

                                        $this->oChangeLogModel->add(
                                            'updated',
                                            'a',
                                            'blog post',
                                            $iPostId,
                                            $aData['title'],
                                            'admin/blog/post/create/' . $this->blog->id . '/' . $iPostId,
                                            $field,
                                            $aOldTags,
                                            $aNewTags,
                                            false
                                        );
                                        break;

                                    default :

                                        $this->oChangeLogModel->add(
                                            'updated',
                                            'a',
                                            'blog post',
                                            $iPostId,
                                            $aData['title'],
                                            'admin/blog/post/create/' . $this->blog->id . '/' . $iPostId,
                                            $field,
                                            $this->data['post']->$field,
                                            $value,
                                            false
                                        );
                                        break;
                                }
                            }
                        }

                        $this->session->set_flashdata('success', ucfirst($this->data['postName']) . ' was updated.');
                        $sRedirectUrl = 'admin/blog/post/edit/' . $this->blog->id . '/' . $iPostId;

                    } else {

                        $sRedirectUrl = $this->blog->url . '/preview/' . $mResult;
                    }

                    redirect($sRedirectUrl);

                } else {

                    $this->data['error']  = 'An error occurred and the post could not be updated. ';
                    $this->data['error'] .= $this->blog_post_model->lastError();
                }

            } else {

                $this->data['error'] = lang('fv_there_were_errors');
            }
        }

        // --------------------------------------------------------------------------

        //  Load Categories and Tags
        $aData = array(
            'where' => array(
                array('column' => 'blog_id', 'value' => $this->blog->id)
            )
        );

        if (appSetting('categories_enabled', 'blog-' . $this->blog->id)) {

            $this->data['categories'] = $this->blog_category_model->getAll(null, null, $aData);
        }

        if (appSetting('tags_enabled', 'blog-' . $this->blog->id)) {

            $this->data['tags'] = $this->blog_tag_model->getAll(null, null, $aData);
        }

        // --------------------------------------------------------------------------

        //  Load other data
        $oCdn                            = Factory::service('Cdn', 'nails/module-cdn');
        $this->data['associations']      = $this->blog_model->getAssociations($this->data['post']->id);
        $this->data['cdnUrlScaleScheme'] = $oCdn->urlScaleScheme();

        // --------------------------------------------------------------------------

        //  Load assets
        $oAsset = Factory::service('Asset');
        $oAsset->library('uploadify');
        $oAsset->library('MUSTACHE');
        $oAsset->load('moment/moment.js', 'NAILS-BOWER');
        $oAsset->load('admin.post.edit.min.js', 'nails/module-blog');

        if ($this->data['post']->is_published) {

            $oNow = new \DateTime();
            $oPublished = new \DateTime($this->data['post']->published);

            if ($oPublished > $oNow) {
                $sInitalPublishState = 'SCHEDULED';
            } else {
                $sInitalPublishState = 'PUBLISHED';
            }

        } else {
            $sInitalPublishState = 'DRAFT';
        }

        $sInlineJs  = 'var _EDIT;';
        $sInlineJs .= '$(function()';
        $sInlineJs .= '{';
        $sInlineJs .= '    _EDIT = new NAILS_Admin_Blog_Create_Edit(\'EDIT\', \'' . $sInitalPublishState . '\');';
        $sInlineJs .= '    _EDIT.init(' . $this->blog->id . ', "' . $oCdn->generateApiUploadToken() . '");';
        $sInlineJs .= '});';

        $oAsset->inline($sInlineJs, 'JS');

        // --------------------------------------------------------------------------

        Helper::loadView('edit');
    }