Determines if content is callable or blade string, processes and returns.

@param mixed $content Pre-processed content
@param array $data    data to use with blade template
@param mixed $param   parameter to call with callable
@return mixed
483674
public static function compileContent($content, array $data, $param)
    {
        if (is_string($content)) {
            return static::compileBlade($content, static::getMixedValue($data, $param));
        } elseif (is_callable($content)) {
            return $content($param);
        }

        return $content;
    }
992808
public function setContent( $content = NULL )
	{
		if( is_object( $content ) ){
			if( !method_exists( $content, '__toString' ) ){											//  content is not a renderable object
				$message	= 'Object of class "'.get_class( $content ).'" cannot be rendered';		//  prepare message about not renderable object
				throw new InvalidArgumentException( $message ); 									//  break with error message
			}
			$content	= (string) $content;														//  render object to string
		}
		$this->content	= $content;
	}
676705
private function contentFromData($data, $format)
	{
		$type = gettype($data);
		if($type === 'string')
		{
			$content = $data;
		}
		else if($type === 'array')
		{
			switch ($format) 
			{
				case 'json':
				case 'jsonp':
					$content = json_encode($data);
					break;
				default:
					$content = serialize($data);
					break;
			}
			if($format === 'jsonp')
			{
				$customData = ('string' === gettype($this->customData)) ? $this->customData : 'data';
				if(!empty($_GET))
				{
					$getKeys = array_keys($_GET);
					$customData = $getKeys[0];
				}
				$customData = trim($customData);
				$content = $customData . '(' . $content . ');';
			}
		}
		else 
		{
			$content = serialize($data);
		}
		return $content;
	}
387517
public function parse($content)
    {
        $processor = new Processor(new RegexParser(), $this->handlers);

        return $processor->process($content);
    }
292917
protected function maybeRender($content)
    {
        if ($content instanceof ViewModel) {
            $content = $this->getView()->render($content);
        }

        return (string) $content;
    }
516989
public function parse($content) {
    $this->resetFd();
    foreach ($this->formdataParts($content) as $part) {
      if (!$this->isLastPart($part)) {
        $this->processFormdataPart($part);
      }
    }
    $this->compileData();
    return $this->fd;
  }
1188529
protected function _parseContent($content) {
        $output = array();
        $matches = array();
        $paramsString = implode('|', $this->_deployParams);
        $pattern = '/:?(?P<paramName>' . $paramsString
            . ')[,:]? [\'"](?P<paramValue>[^\'"]*)[\'"]/';

        if (!preg_match_all($pattern, $content, $matches)) {
            throw new Exception(
                "Could not extract deploy parameters from "
                . self::GENERIC_CONFIG_PATH
            );
        }

        foreach ($this->_deployParams as $p) {
            $indices = array_keys(
                array_filter(
                    $matches['paramName'], function ($pn) use ($p) {
                        return $pn === $p;
                    }
                )
            );
            if (!count($indices)) {
                continue;
            }
            $output[$p] = array_values(array_get_subset($matches['paramValue'], $indices));

            // For now: only treat the server param as array (since it's common for it to be an
            // array, in the case of a multi-server setup)
            if ($p !== 'server') {
                $output[$p] = $output[$p][0];
            }
        }

        // explode server into user and server parts
        if (!empty($output['server'])) {
            $output['server'] = array_map(
                function ($serverConfig) {
                    $bits = explode('@', $serverConfig, 2);
                    return array(
                    'user' => $bits[0],
                    'server' => $bits[1]
                    );
                }, $output['server']
            );
        }

        return $output;
    }
948594
public function render($content, $data = [])
    {
        if (!$content) {
            return '';
        }

        $html = $this->renderTwig($content, $data);

        $html = Markdown::parseSafe($html);

        return $html;
    }
626054
private function checkContent($content)
    {
        if (! is_array($content) and ! is_string($content)) {
            throw new InvalidTypeException(
                'The content must be an array or string value, ' . gettype($content) . ' is given.'
            );
        }

        $this->checkSingleValuedContent($content);

        return is_array($content) ? $content : [$content];
    }
658516
protected function ajaxContent($content)
    {
        $message = null;

        $this->header('Content-Type', 'application/json');

        if ($content instanceof Arrayable) {
            $content = $content->toArray();
        } elseif (is_string($content)) {
            $content = ['content' => $content];
        } elseif (!is_array($content) && !$content instanceof \Exception) {
            return $this->ajaxContent(new \Exception("No valid content has been submitted!", BaseResponse::HTTP_BAD_REQUEST));
        } elseif ($content instanceof \Exception) {

            $this->setStatusCode($content->getCode() < 300 ? BaseResponse::HTTP_BAD_REQUEST : $content->getCode());

            $message = $content->getMessage();

            if ($content instanceof MbException) {
                $content = $content->getMessages();
            } else {
                $content = null;
            }
        }

        $this->original = [
            'meta' => [
                'code'    => $this->getStatusCode(),
                'message' => $message,
            ],
            'data' => $content,
        ];

        $this->getMbAudit()->setResponseType('ajax');
        $this->getMbAudit()->setResponseData($this->original);

        return $this->original;
    }
849742
public function html($content) {
        if (func_num_args() == 1) {
            $this->_data['fields'][] = $content;
            return $this;
        }
        $this->__attributes['fields'][$content] = func_get_arg(1);
        return $this;
    }
1026734
protected function _handleCallableBody(callable $content)
    {
        ob_start();
        $result1 = $content();
        $result2 = ob_get_contents();
        ob_get_clean();

        if ($result1) {
            return $result1;
        }

        return $result2;
    }
969961
protected function prepare_json_content( $content ) {
		if ( $content instanceof Jsonable ) {
			return $content->toJson();
		}

		if ( $content instanceof Arrayable ) {
			return json_encode( $content->toArray() );
		}

		return json_encode( $content );
	}
1111231
function post($content) {
  // Iterate over the afterFns
  var i = 0,
      len = afterFns.length;
  for (; i < len; i++) {
    $content = afterFns[i].call(this, $content) || $content;
  }

  // Return tmpl
  return $content;
}
374422
private function executePlainRendering($content, $data)
    {
        $this->obFlushAndStar();

        extract($data);

        $filename = $this->createTmpFile($content);

        require $filename;

        @unlink($filename);

        return $this->obGetContent();
    }
873580
public function prepareContent($content)
    {
        if (is_array($content)) {
            $ctt = '';
            foreach ($content as $key=>$ctt_entry) {
                $ctt .= $ctt_entry;
            }
            $content = $ctt;
        }
        return (string) $content;
    }
55339
public function setContent($content)
    {
        $this->original = $content;

        // If the content is "JSONable" we will set the appropriate header and convert
        // the content to JSON. This is useful when returning something like models
        // from routes that will be automatically transformed to their JSON form.
        if ($this->shouldBeJson($content)) {
            $this->headers->set('Content-Type', 'application/json');

            $content = $this->morphToJson($content);
        }

        // If this content implements the "RenderableInterface", then we will call the
        // render method on the object so we will avoid any "__toString" exceptions
        // that might be thrown and have their errors obscured by PHP's handling.
        else if ($content instanceof RenderableInterface) {
            $content = $content->render();
        }

        return parent::setContent($content);
    }