Vrati text
@param string $const
@return Content
@throws UniqueConstraintViolationException
335269
public function getContent(string $const): Content
	{
		$locale = $this->translator->getLocale();
		$content = $this->orm->content->getByConst($const, $locale);
		if (!$content) {
			$content = new Content;
			$this->orm->content->attach($content);

			$content->name = $const;
			$content->setLocale($locale);
			$content->setConst($const);
			$content->content = '';

			$this->orm->content->persistAndFlush($content);
		}
		return $content;
	}
513255
public function asText($text)
    {
        $stream = StreamFactory::string($text);
        return new Response($stream, self::OK, ['Content-Type' => 'text/plain']);
    }
1213574
public function text($text)
    {
        if (mb_strlen($text) > 320) {
            throw CouldNotCreateMessage::textTooLong();
        }

        $this->text = $text;
        $this->hasText = true;

        return $this;
    }
712003
protected function buildConstant(ClassConstant $constant, $indent)
    {
        $source = 'const '.$constant->getName();

        $value = $this->wrapPHPValue([
            'default' => $constant->getValue(),
        ]);

        $docBlock = new DocBlock($constant->getDocBlock(), $indent);

        return $docBlock."\n".$indent.$source.' = '.$value.';';
    }
619535
public function getConsts($prefix)
    {
        if (isset(self::$consts[$prefix])) {
            return self::$consts[$prefix];
        }

        // 1. Get all class constants
        $class = new \ReflectionClass($this);
        $consts = $class->getConstants();

        // 2. Use exiting constant configs
        $property = lcfirst(str_replace('_', '', ucwords($prefix, '_'))) . 'Table';
        if (isset($this->$property)) {
            $data = $this->$property;
        } else {
            $data = [];
        }

        // 3. Generate id and name
        $prefix .= '_';
        $length = strlen($prefix);
        foreach ($consts as $name => $id) {
            if (stripos($name, $prefix) !== 0) {
                continue;
            }
            if (in_array($name, $this->constExcludes)) {
                continue;
            }
            $data[$id]['id'] = $id;
            $data[$id]['name'] = strtolower(strtr(substr($name, $length), ['_' => '-']));
        }

        self::$consts[$prefix] = $data;

        return $data;
    }
94249
private function generateConsts()
    {
        $result = '<?php' . PHP_EOL;
        foreach($this->ref->getConstants() as $name => $value)
        {
            $value = var_export($value, true);
            $result .= <<<CODE
define('{$name}', {$value});

CODE;
        }
        file_put_contents($this->savePath . '/consts.php', $result);
    }
1031449
protected function parseObject($isConst)
    {
        $start = $this->token->getStart();
        $this->expect(Token::BRACE_L_TYPE);

        $fieldNames = [];
        $fields = [];
        while (!$this->skip(Token::BRACE_R_TYPE)) {
            array_push($fields, $this->parseObjectField($isConst, $fieldNames));
        }

        return new ObjectValue($fields, $this->location($start));
    }
860698
public function rewriteNamespacedImports (string $fileContent) : string
    {
        $importParser = new CssUrlImportParser();
        return $importParser->replaceValidImports(
            $fileContent,
            function (string $path)
            {
                try
                {
                    $asset = Asset::createFromAssetPath($path);
                    return $this->assetUrl->generateUrl($asset);
                }
                catch (AssetsException $e)
                {
                    // wasn't an asset path
                    return $path;
                }
            }
        );
    }
767435
public static function getGenericTypeText($type)
    {
        switch ($type) {
            case static::T_IMAGE:
                return t('Image');
                break;
            case static::T_VIDEO:
                return t('Video');
                break;
            case static::T_TEXT:
                return t('Text');
                break;
            case static::T_AUDIO:
                return t('Audio');
                break;
            case static::T_DOCUMENT:
                return t('Document');
                break;
            case static::T_APPLICATION:
                return t('Application');
                break;
            case static::T_UNKNOWN:
                return t('File');
                break;

        }
    }
904593
function renderingTitle($state = null) {
		if (!is_null($state)) {
			$this->_renderingTitle = $state;
		}
		return $this->_renderingTitle;
	}
450427
public function getSchemaUniqueConstraints($conn = null)
    {
        $command = $this->invoke('neo.get_constraints_command', $conn);
        $httpResponse = $command->execute();

        $responseO = $this->handleHttpResponse($httpResponse);
        $response = $responseO->getBody();
        $constraints = [];
        foreach ($response as $constraint) {
            foreach ($constraint['property_keys'] as $key) {
                $constraints[] = new UniqueConstraint($constraint['label'], $key);
            }
        }

        return $constraints;
    }
946986
public function parseConst(\ReflectionClass $ref, \ReflectionClassConstant $const)
    {
        $annotations = $this->reader->getConstantAnnotations($const);
        if($this->checkAnnotations($annotations))
        {
            $this->data[$ref->getName()]['const'][$const->getName()] = $this->fileMap[$ref->getFileName()][$ref->getName()]['const'][$const->getName()] = &$annotations;
        }
    }
927701
public function setTextContent($textContent)
    {
        $this->entity->setEntityName('ribbon-' . $textContent);
        $this->textContent->push($textContent);

        return $this;
    }
1191372
protected function evaluateConst()
    {
        
        common_Logger::d('CONSTANTE TYPE', array('Generis Term evaluateConst'));
	    $property = new core_kernel_classes_Property(RulesRdf::PROPERTY_TERM_VALUE);
	    return $this->getUniquePropertyValue($property); 
        
    }
363350
protected function consumeRegexp($regexp)
    {
        if (!preg_match($regexp.'A', $this->content, $vars, null, $this->cursor)) {
            throw new \InvalidArgumentException('No match for regexp '.$regexp.' Upcoming: '.substr($this->content, $this->cursor, 30));
        }

        $this->cursor += strlen($vars[0]);

        return $vars;
    }
411736
static public function instance($text=null)
    {
        if ($text) {
            if (isset(static::$instances[$text])) {
                return static::$instances[$text];
            } else {
                $object = static::$instances[$text] = new static($text);
            }
        } else {
            $object = new static();
        }
        
        $object->setSize(300)->setPadding(10);
        
        return $object;
    }
579559
public static function concat(iterable $pieces, ?string $delimiter = null): self
    {
        $delimiter = is_null($delimiter) ? Text::EMPTY_TEXT : $delimiter;

        $temp = TextVector::make($pieces)
            ->concat($delimiter);

        return self::make($temp);
    }