Get valid selectwprice data
@param $content
@return \stdClass
517212
protected function _defaultData($content)
    {
        $content = @unserialize($content);
        if (empty($content) || !is_a($content, \stdClass::class)) {
            $content = new \stdClass;
        }
        $content->selected = isset($content->selected) ? $content->selected : '';
        $content->price = isset($content->price) ? $content->price : '';
        return $content;
    }
720332
protected function getEOL($content)
    {
        static $eols = [
            "\r\n",
            "\n",
            "\r",
        ];
        foreach($eols as $eol)
        {
            if(strpos($content, $eol))
            {
                return $eol;
            }
        }
        return PHP_EOL;
    }
229298
public static function select(
        string $content, 
        array $attributes = [],
        array $options = []
    ) : string
    {
        foreach ($options as $key => $val) {
            $content .= $this->option($key, ["value" => $val]);
        }
        return self::tag("select", $content, $attributes);
    }
1274326
protected function bbCodesHandle($content) {
		return preg_replace_callback('~\[([a-z]+)\](.*?)\[/\1\]~', function($match) use($bbCodes) {
			array_shift($match);
			list($tag, $value) = $match;
			
			if (preg_match('~\[[a-z]+\]~', $value)) {
				$value = $this->bbCodesHandle($value);
			}
			
			if ($tag === 'keyword') {
				return $this->color($value, 'cyan');
			}
			
			if ($tag === 'alert') {
				return $this->color($value, 'red');
			}
			
			if ($tag === 'success') {
				return $this->color($value, 'green');
			}
			
			if ($tag === 'warning') {
				return $this->color($value, 'yellow');
			}
			
			if ($tag === 'info') {
				return $this->color($value, 'blue');
			}
			
			return $value;
		}, $content);
	}
353125
protected function _defaultData($content)
    {
        $content = @unserialize($content);
        if (empty($content) || !is_a($content, \stdClass::class)) {
            $content = new \stdClass;
        }
        $content->captcha = !empty($content->captcha) ? $content->captcha : false;
        $content->email_from = !empty($content->email_from) ? $content->email_from : '';
        $content->email_to = !empty($content->email_to) ? $content->email_to : '';
        $content->template = !empty($content->template) ? $content->template : '';
        $content->page_to = !empty($content->page_to) ? $content->page_to : '';
        return $content;
    }
749844
public static function getIndent($content)
    {
        $indent = self::DEFAULT_INDENT;
        preg_match(self::INDENT_REGEX, trim($content), $matches);

        if (!empty($matches)) {
            $indent = \strlen($matches[1]);
        }

        return $indent;
    }
580604
public function getControl($content = NULL)
	{
		$btn = Html::el('button', [
			'type' => 'button',
			'name' => $this->getHtmlName(),
		]);
		$btn->setHtml($content === NULL ? $this->caption : $content);
		$this->addBtnClass($btn);

		return $btn;
	}
1149853
static public function getFileExt($content)
    {
        $types = array(
            255216 => 'jpg', 7173 => 'gif', 6677 => 'bmp', 13780 => 'png',
            7368   => 'mp3', 4838 => 'wma', 7784 => 'mid', 6063 => 'xml',
        );
        $typeInfo = @unpack("C2chars", substr($content, 0, 2));
        $typeCode = intval($typeInfo['chars1'] . $typeInfo['chars2']);
        return isset($types[$typeCode]) ? $types[$typeCode] : 'mp4';
    }
295106
public function getExcerpt($content = null)
    {
        $raw = $exc = $this->base->post_excerpt;

        if (!strlen($exc)) {
            $exc = $content === null ? $this->getRawContent() : $content;
            $exc = strip_shortcodes($exc);
            $exc = apply_filters('the_content', $exc);
            $exc = str_replace(']]>', ']]&gt;', $exc);
            $exc = wp_trim_words(
                $exc,
                apply_filters('excerpt_length', 55),
                apply_filters('excerpt_more', ' ' . '[&hellip;]')
            );
        }

        return apply_filters('wp_trim_excerpt', $exc, $raw);
    }
1278079
public function getAccept($content = false) {
		if ($content) {
			if (array_key_exists('HTTP_ACCEPT_'.$content, $_SERVER)) {
				return $_SERVER['HTTP_ACCEPT_'.$content];
			}

			throw HttpException::AcceptParameterMistake();
		}

		return $_SERVER['HTTP_ACCEPT'];
	}
519006
private function getContentData($content)
    {
        $res = [];
        $res['startStringPos'] = strpos($content, $this->startString) + strlen($this->startString);
        $res['endStringPos'] = strpos($content, $this->endString);
        $res['bundleList'] = substr($content, $res['startStringPos'], ($res['endStringPos'] - $res['startStringPos']));
        return $res;
    }
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;
    }
971262
public function edit($content)
    {
        $dotName = str_replace(['[', ']'], ['.', ''], $this->_getInputHTMLKey());
        $submittedData = Request::input($dotName);
        return CmsBlockInput::make($this->_block->type, $this->_editViewData + [
                'label' => $this->_block->label,
                'name' => $this->_getInputHTMLKey(),
                'content' => $content,
                'submitted_data' => $submittedData ? $this->_defaultData($submittedData) : null,
                'note' => $this->_block->note,
                '_block' => $this->_block,
                '_blockType' => $this
            ]);
    }
461091
public function getStopwordCount(string $content): WordStats {
        if (empty($content)) {
            return new WordStats();
        }

        $strippedInput = $this->removePunctuation($content);
        $candidateWords = $this->getCandidateWords($strippedInput);

        $overlappingStopWords = [];
        foreach ($candidateWords as $w) {
            if (in_array(mb_strtolower($w), $this->getWordList())) {
                $overlappingStopWords[] = mb_strtolower($w);
            }
        }

        return new WordStats([
            'wordCount' => count($candidateWords),
            'stopWordCount' => count($overlappingStopWords),
            'stopWords' => $overlappingStopWords,
        ]);
    }
1129176
function getContentItemSelection($data=false)
    {
        if ( ! $data ) $data = LTIX::ltiRawParameter('data');
        return parent::getContentItemSelection($data);
    }
316281
public static function getContentMimeType($content)
    {
        $finfo = finfo_open(FILEINFO_MIME_TYPE);
        $mimeType = finfo_buffer($finfo, $content);
        finfo_close($finfo);

        return $mimeType;
    }
151977
protected function string($content)
    {
        // Check if not is string ...
        if (false === is_string($content)) {
            // ... and make string of it.
            $content = var_export($content, true);
        }

        return $content;
    }