Create new Atom document.

@param Extensions $extensions Extension registry.
@param string     $name       Element name.

@return Document|null

@since 1.0
358215
public function createDocument(Extensions $extensions, $name)
    {
        switch ($name) {
            case 'app:service':
                // No document — no exception.
                return new ServiceDocument($extensions);
            case 'app:categories':
                // No document — no exception.
                return new CategoryDocument($extensions);
        }

        return null;
    }
925413
public function create($name)
    {
        $params = array(
            "tag" => array(
                "name" => $name
            )
        );
        $rst = $this->_request->post($this->_url . 'tags/create', $params);
        return $this->_client->rst($rst);
    }
383297
private function getViewFile($name, $extension = 'html')
    {
        return $this->viewsConfiguration->getViewsPath($this->app->getBasePath()) . DIRECTORY_SEPARATOR . $name . '.' . $extension;
    }
99564
private function addElement($name, $parent = false, $ns = false)
    {
        if ($ns) {
            $el = $parent->ownerDocument->createElementNS($ns, $name);
        } else {
            $el = $parent->ownerDocument->createElement($name);
        }
        if ($parent) {
            $parent->appendChild($el);
        }

        return $el;
    }
611906
public static function createSub($name = '', $content = null)
	{
		$class = get_called_class();
		$element = new $class($name, $content);
		$element->sub = true;
		return $element;
	}
356896
protected function ext($name, $ext)
    {
        // Obtain Info:
        
        $info = pathinfo($name);
        
        // Check Extension:
        
        if (!isset($info['extension']) || $info['extension'] !== $ext) {
            $name = sprintf('%s.%s', $name, $ext);
        }
        
        // Answer Name:
        
        return $name;
    }
619675
public function extension($extension = null)
    {
        if (is_null($extension)) {
            if (!empty($this->extension)) {
                return $this->extension;
            }
            if (isset($this->attributes['extension'])) {
                return $this->attributes['extension'];
            }
        }
        $this->extension = $this->checkExtension($extension);

        return $this;
    }
899296
public function createClass(string $name, string $location, string $extends = "") : bool
    {
        $namespace = trim($this->getNameSpace($name));
        $name = trim($this->getClassName($name));
        $className = $name;

        if ($extends !== "") {
            $className .= " extends {$extends}";
        }

        if ($namespace != "") {
            $namespace = "namespace ".$namespace;
        }

        $class = file_get_contents($this->templates["class.template"]);
        $class = str_replace(["[namespace]","[name]"], [$namespace, $className], $class);

        if (is_dir($location)) {
            file_put_contents($location."/".$name.".php", $class);
            return true;
        }

        return false;
    }
350952
public function createElement(Node $parent, $name)
    {
        if (array_key_exists($name, $this->elementMap)) {
            $class = $this->elementMap[$name];

            return new $class($parent);
        }

        return null;
    }
205474
function(name, extension) {
                extension._name = name;
                this.extensions[name] = extension;
                this.extensionsList.push(extension);
            }
299672
public function removeExtension($name)
    {
        if (array_key_exists($name, $this->extensions)) {
            unset($this->extensions[$name]);
        }

        return $this;
    }
523734
protected function element(string $name): \DOMElement
    {
        if (\strpos($name, ':') !== false)
        {
            $keys = explode(':', $name);

            return $this->document()->createElementNS(
                $this->namespaces[$this->options()->getNamespace() . ':' . \current($keys)],
                $name
            );
        }

        return $this->createElement($name);
    }
94555
public function createInlineElement($selector, $name = null)
    {
        $elementClass = $this->classNameResolver->resolveElement($name ? $name : 'SensioLabs\Behat\PageObjectExtension\PageObject\InlineElement');

        if ('SensioLabs\Behat\PageObjectExtension\PageObject\InlineElement' !== $elementClass && !is_subclass_of($elementClass, 'SensioLabs\Behat\PageObjectExtension\PageObject\InlineElement')) {
            throw new \InvalidArgumentException(sprintf('Not a page object class: %s', ''));
        }

        return new $elementClass($selector, $this->mink->getSession(), $this);
    }
667366
private function createNode($name, $entry = null, $entryAttribute = null)
    {
        $document = $this->getDocument();

        try {
            $node = $document->createElement($name);
        } catch (\DOMException $e) {
            $node = $document->createElement($entry ?: $this->entry);

            if (is_string($name)) {
                $node->setAttribute($entryAttribute ?: $this->entryAttribute, $name);
            }
        }

        return $node;
    }
611457
public function getExtensionConfig($name)
    {
        if (!isset($this->extensionConfigs[$name])) {
            $this->extensionConfigs[$name] = [];
        }

        return $this->extensionConfigs[$name];
    }
281334
public function getExtension(
        /*# string */ $extensionName
    )/*# : ExtensionAbstract */ {
        if (!$this->hasExtension($extensionName)) {
            $this->addExtension(new $extensionName);
        }
        return $this->extensions[$extensionName];
    }
759184
public function getElement( $name, $prefix = null )
	{
		return $this->hasElement( $name, $prefix )
			? $this->elements[ is_null( $prefix ) ? $name : "$prefix:$name" ]
			: false;
	}