Creates new document from markup.
Chainable.

@param  unknown_type $markup
@return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
192532
public static function newDocumentPHP($markup = null, $contentType = "text/html") 
    {
        // TODO pass charset to phpToMarkup if possible (use DOMDocumentWrapper function)
        $markup = phpQuery::phpToMarkup($markup, self::$defaultCharset);
        return self::newDocument($markup, $contentType);
    }
299364
protected function createDocument($raw, $rawMetadata, $rawContent)
    {
        return new Document(
            $raw,
            $this->parseMetadata(trim($rawMetadata)),
            $this->parseContent(trim($rawContent))
        );
    }
937422
public function build(): GetDocumentRequest
	{
		$instance = new GetDocumentRequest();
		$instance->depth = $this->depth;
		$instance->pierce = $this->pierce;
		return $instance;
	}
294315
function(markup) {
		var match, fix;
		markup = markup.trim().replace(this._comments, "");
		if ((match = markup.match(this._firsttag))) {
			if ((fix = this._unsanestructures[match[1]])) {
				markup = fix.
				replace("${class}", this._classname).
				replace("${markup}", markup);
			}
		}
		return markup;
	}
801721
private function createRawDomDocument($html)
    {
        $domDocument = new \DOMDocument();
        $domDocument->strictErrorChecking = false;
        $domDocument->formatOutput = true;
        $libXmlState = \libxml_use_internal_errors(true);
        $domDocument->loadHTML($this->prepareHtmlForDomConversion($html));
        \libxml_clear_errors();
        \libxml_use_internal_errors($libXmlState);

        $this->domDocument = $domDocument;
    }
1108490
public static Document newDocument() throws AlipayApiException {
        Document doc = null;

        try {
            doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
        } catch (ParserConfigurationException e) {
            throw new AlipayApiException(e);
        }

        return doc;
    }
1312971
public function create($mixed = null, $options = array())
    {
        $this->request = Strata::router()->getCurrentController()->request;

        if (!is_null($mixed) && !in_array('Strata\\Model\\CustomPostType\\ModelEntity', class_parents($mixed))) {
            throw new Exception("A form can only be linked to either an object inheriting ModelEntity or nothing at all.");
        }

        if (is_object($mixed)) {
            $this->associatedEntity = $mixed;
        }

        $this->configuration = $this->parseFormConfiguration($options);

        $formAttributes = $this->configuration;
        unset($formAttributes['hasSteps']);
        unset($formAttributes['type']);
        unset($formAttributes['nonce']);

        if (!is_null($this->associatedEntity) && $this->associatedEntity->hasValidationErrors()) {
            if (array_key_exists('class', $formAttributes)) {
                $formAttributes['class'] .= " has-errors ";
            } else {
                $formAttributes['class'] = "has-errors";
            }
        }

        $htmlAttributes = $this->arrayToHtmlAttributes($formAttributes);

        $salt = $this->getNonceSalt();
        $nonceTag = $this->generateNonceTag($salt);
        $nonceHidden = $this->generateHidden(array("name" => "auth_id"), wp_create_nonce($salt));

        return sprintf("<form %s>\n%s\n%s\n", $htmlAttributes, $nonceHidden, $nonceTag);
    }
419989
private function createMetadataNode(\DOMDocument $document, string $type = null): \DOMNode
    {
        $node = $document->createElement('object');
        if (null !== $type) {
            $node->setAttribute('type', $type);
        }

        return $node;
    }
681386
static public function create(SynthesizeOption $objOptions){
		$strType = TypeFactory::getType($objOptions->type);
		if(!class_exists($strType)){
			throw new UnknownTypeException($strType);
		}

		$objObject = new $strType(null, $objOptions);
		return $objObject;
	}
994397
public static function newDocumentXHTML($markup = null, $charset = null) 
    {
        $contentType = $charset
        ? ";charset=$charset"
        : '';
        return self::newDocument($markup, "application/xhtml+xml{$contentType}");
    }
678757
function makeSetMarkup(markup) {
  // NOTE: Null values reduce hidden classes.
  return {
    type: 'SET_MARKUP',
    content: markup,
    fromIndex: null,
    fromNode: null,
    toIndex: null,
    afterNode: null
  };
}
754655
function(markup) {

	var container = y.createElement('div');
	container.innerHTML = markup;

	return new NWTNodeInstance(container.childNodes[0]);
}
819814
public function newQuery($excludeDeleted = true)
    {
        $builder = parent::newQuery($excludeDeleted);

        if ($this->isSubType())
        {
            $builder->where($this->typeField, $this->getClass($this->typeField));
        }

        return $builder;
    }
182224
public function build(): SetDocumentContentRequest
	{
		$instance = new SetDocumentContentRequest();
		if ($this->frameId === null) {
			throw new BuilderException('Property [frameId] is required.');
		}
		$instance->frameId = $this->frameId;
		if ($this->html === null) {
			throw new BuilderException('Property [html] is required.');
		}
		$instance->html = $this->html;
		return $instance;
	}
922038
def _create_markup_plugin(language, model):
    
    form = type("{0}MarkupItemForm".format(language.capitalize()), (MarkupItemForm,), {
        'default_language': language,
    })

    classname = "{0}MarkupPlugin".format(language.capitalize())
    PluginClass = type(classname, (MarkupPluginBase,), {
        'model': model,
        'form': form,
    })

    return PluginClass
427617
public function createQuery($context = 'list')
    {
        if ($context === 'list') {
            /** @var $em \Doctrine\ORM\EntityManager */
            $em = $this->getModelManager()->getEntityManager($this->getClass());

            /** @var $cmd \Doctrine\Common\Persistence\Mapping\ClassMetadata */
            $cmd = $em->getMetadataFactory()->getMetadataFor($this->getClass());

            $queryBuilder = $em->createQueryBuilder();
            $queryBuilder
                ->select('n')
                ->from($this->getClass(), 'n');

            if ($cmd->hasField('root')) {
                $queryBuilder->orderBy('n.root, n.lft');
            } else {
                $queryBuilder->orderBy('n.lft');
            }

            return new ProxyQuery($queryBuilder);
        }
        return parent::createQuery($context);
    }
739225
public function clean($markup, $config = null)
    {
        if (empty($config) && !empty($this->_config['config'])) {
            $config = $this->config('config');
        }
        return Purifier::clean($markup, $config);
    }