バッファにスタイルを挿入します
@param $element
@param array ...$codes
@return $this
437931
protected function insertStylesToBuffer($element, ...$codes)
    {
        $codes = $codes[0];
        $fmtCode = '';
        foreach ($codes as $selector => $code)
        {
            $fmtCode .= $selector . '{';
            foreach ($code as $property => $value)
            {
                $fmtCode .= $property . ':' . $value . ';';
            }
            $fmtCode .= '}';
        }
        array_splice($this->buffer, $this->pointer++, 0, '<' . $element . '>');
        array_splice($this->buffer, $this->pointer++, 0, $fmtCode);
        array_splice($this->buffer, $this->pointer++, 0, '</' . $element . '>');
        return $this;
    }
120366
public function resolveElement(Element $element)
    {
        $elementtype = $this->elementService->findElementtype($element);

        return $this->resolveElementtype($elementtype);
    }
874219
public function addElement($element){

        $elements = $this->formElements;
        $elements[] = $element;

        $this->formElements = $elements;

        return $this;
    }
50722
public function append($elements)
    {
        if (!empty($elements)) {
            $elements = is_array($elements) ? $elements : [$elements];

            foreach ($elements as $element) {
                if ($element instanceof Image || $element instanceof Text) {
                    $this->elementList[] = $element;
                }
            }
        }

        return $this;
    }
1246697
public function setCode($code) {
        $this->code = trim($code);
        $this->codeLength = strlen($this->code);
        return $this;
    }
108637
public function filter($code)
    {
        $elements = (array) $this->elements($code);

        foreach ((array) $elements as $element)
        {
            $original = (string) $element->nodeValue;

            $minified = $this->minify($original);

            $minified = preg_replace('/\s+/', ' ', $minified);

            $minified = $this->minify($minified);

            $code = str_replace($original, $minified, $code);
        }

        return $code;
    }
155637
public function addElement(OrderElement $elements)
    {
        $this->elements[] = $elements;
        $elements->setOrder($this);

        return $this;
    }
1284912
public function append($element) {
        $this->elements[] = $element;
        $this->fire(new ListCreateEvent($element, $this->count() - 1));
        return $this;
    }
182254
public function setStatusCode($code)
    {
        static $sg = null;

        if (is_null($sg)) {
            $sg = new StatusGenerator();
        }

        $status = $sg->generate($code);

        if ($status !== false) {
            $this->append($status);
        }

        return $this;
    }
1264218
public function addElement($element)
    {
        if ($this->processing === 'B') {
            $this->bodyElements[] = $element;
        } elseif ($this->processing === 'H') {
            $this->headerElements[] = $element;
        } elseif ($this->processing === 'F') {
            $this->footerElements[] = $element;
        }
    }
799893
public function set(string $key, $element): self
    {
        $this->validate($element);

        $this->elements[$key] = $element;

        foreach ($this->indexes as $index) {
            $index->add($key, $element);
        }

        return $this;
    }
121076
public function addFormElement(array $element, $options = array())
    {
        if (array_key_exists($element['name'], $this->formElements)) {
            throw new \Exception('Form element "'.$element['name'].'" is already added, use replaceFormElement() or removeElement() instead');
        }
    	$this->formElements[$element['name']] = $element;
        if (!empty($options) && is_array($options)) {
            $this->formElementOptions[$element['name']] = $options;
        }
        return $this;
    }
854999
public function writePlainRtfCode($code)
    {
        $element = new PHPRtfLite_Element_Plain($this->_rtf, $code);
        $element->setIsRtfCode();
        $this->_elements[] = $element;

        return $element;
    }
1373340
public function setElement($element = null)
    {
        $this->element = null;

        if (!$element = $this->internalResolveElement($element)) {
            $this->element = $this->elementId = null;
        } else {
            /** @var Element $element */
            $this->elementId = $element->id;
            $this->element = $element;
        }

        return $this;
    }
1318500
public function addWhere($element, array $values, $operator)
    {
        if (!$element instanceof Where) {
            $element = new self($element, $values);
        }

        if ($element->isEmpty()) {
            return $this;
        }

        if ($this->isEmpty()) {
            $this->transmute($element);

            return $this;
        }

        if ($this->hasElement()) {
            $this->stack = [new self($this->getElement(), $this->values), $element];
            $this->element = null;
            $this->values = [];
        } else {
            if ($this->operator == $operator) {
                $this->stack[] = $element;
            } else {
                $this->stack = [
                    self::create()
                        ->setStack($this->stack)
                        ->setOperator($this->operator),
                    $element
                ];
            }
        }

        $this->operator = $operator;

        return $this;
    }
474530
public function add($element) {
		if (!in_array($element, $this->collection, true)) {
			$this->collection[$this->size()] = $element;
		}

		return $this;
	}
842072
public function code( $codes )
	{
		if( !empty( $codes ) ) {
			$this->conditions[] = $this->filter->compare( '==', 'stock.productcode', $codes );
		}

		return $this;
	}