Путь на файл используемого класса (логики)
@param null $new Установка своего класса. Сведения о загружаемом файле или его программный код
@param bool $root Возвращать полный путь или от директории сайта?
@return string
433302
function logic($new = null, $root = false)
    {
        if (isset($new)){
            if (is_string($new)){
                $new = array(
                    'tmp_name'	=> $new,
                    'size' => @filesize($new),
                    'error'	=> is_file($new)? 0 : true
                );
            }
            $this->change('logic', $new);
            $this->change('is_default_logic', false);
        }
        if ($proto = $this->is_default_logic(null, true)){
            $path = $proto->logic(null, $root);
        }else
        if ($this->_attributes['is_default_logic']) {
            $path = ($root ? DIR : '/').'vendor/boolive/core/data/Entity.php';
        }else{
            $path = $this->dir($root).$this->name().'.php';
        }
        return $path;
    }
921459
protected function signElement(DOMElement $root, DOMNode $insertBefore = null) : ?DOMElement
    {
        if ($this->signatureKey === null) {
            /* We cannot sign this element. */
            return null;
        }

        Utils::insertSignature($this->signatureKey, $this->certificates, $root, $insertBefore);

        return $root;
    }
97530
public function getSet($root)
    {
        $filters = $this->getQueryFilters();
        $filters['where'] = array($this->_child_key => $root);

        $options = array(
            'repository' => $this->getChildRepository(),
            'query' => $filters,
            'root' => $root,
            'property' => $this->_child_key,
        );

        $set = AnService::get('anahita:domain.entityset.decorator.onetomany', $options);

        return $set;
    }
286095
function proto($new = null, $return_entity = false)
    {
        if (isset($new)){
            if ($new instanceof Entity){
                $this->_proto = $new;
                $new = $new->uri();
            }else{
                $this->_proto = null; // for reloading
            }
            if ($new != $this->_attributes['proto']){
                $this->change('proto', $new);
            }
        }
        if ($return_entity){
            if (!isset($this->_proto)){
                if (isset($this->_attributes['proto'])){
                    $this->_proto = Data::read($this->_attributes['proto']);
                }else{
                    $this->_proto = false;
                }
            }
            return $this->_proto;
        }
        return $this->_attributes['proto'];
    }
331433
function getUrl($size = null) {
        $url = $this->makeUrl($size);
        //на случай получения картинок с другого сервера
        $prefix = (string) env('LARAKIT_THUMB_PREFIX');
        if(!$prefix) {
            //если со своего - проверяем их наличие
            $file = public_path($url);
            if(file_exists($file)) {
                return $url;
                //                return $url . '?' . microtime(true);
            }
        }
        else {
            return $url;
            //            return $url . '?' . microtime(true);
        }
        
        return $size ? $this->getSize($size)
                            ->getDefault() : null;
    }
1154028
protected function findBaseRootElementOrNull()
    {
        $qb = parent::createBaseQueryBuilder();

        $qb->andWhere($qb->getRootAliases()[0] . '.isRoot = 1');
        $qb->andWhere($qb->getRootAliases()[0] . '.parent IS NULL');

        $root = $qb->getQuery()->getOneOrNullResult();

        return $root;
    }
689924
function dir($root = false, $current = false)
    {
        $dir = $this->uri($current);
        if ($root){
            return DIR.trim($dir,'/').'/';
        }else{
            return $dir.'/';
        }
    }
132994
public function makeRepository($namespace = 'Repository')
  {
    $class = $this->getItemClass();
    $name = $this->getName();

    return "<?php\n\nnamespace $namespace;\n\n"
    . "/**\n"
    . ' * Этот файл сгенерирован автоматически по схеме ' . $name . "\n"
    . " *\n"
    . ' * @method ' . $class . '[]|\Base\Collection find($where = null, $orderby = null, $onpage = null, $page = null) Получить коллекцию объектов' . "\n"
    . ' * @method ' . $class . ' findOne($where = null, $orderby = null) Найти и получить один объект' . "\n"
    . ' * @method ' . $class . ' make() Создать новый объект' . "\n"
    . ' * @method ' . $class . ' fetchObject(\PDOStatement $statement) Получение объекта из запроса' . "\n"
    . "*/\n"
    . "class " . $name . " extends " . $this->getRepositoryBaseClass() . "\n"
    . "{\n"
    . "  protected function init()\n"
    . "  {\n"
    . "    \$this->setItemClass('$class');\n"
    . "    \$this->setTable('" . $this->getTable() . "');\n"
    . "  }\n"
    . "}\n";
  }
697047
public function value($root, $path)
    {
        if (!is_array($root) && !is_object($root)) {
            return null;
        }

        if (!$this->isNestedKey($path)) {
            return $this->getNode($root, $path);
        }

        return $this->getNestedValue($root, $path);
    }
861475
public static function current($locale = null)
    {
        // Сохраним старое значение локали
        $_locale = self::$current_locale;

        // If nothing is passed just return current locale
        if (!isset($locale)) {
            return $_locale;

        } else { // Switch locale
            // Save new locale
            self::$current_locale = strtolower($locale);

            // Запишем текущее значение локализации
            $_SESSION['__SAMSON_LOCALE__'] = self::$current_locale;

            // Вернем текущее значение локали сайта до момента візова метода
            return self::$current_locale;
        }
    }
32124
public function formatRoot($scheme, $root = null)
    {
        if (is_null($root)) {
            if (is_null($this->cachedRoot)) {
                $this->cachedRoot = $this->forcedRoot ?: $this->getRequestRoot();
            }

            $root = $this->cachedRoot;
        }

        return parent::formatRoot($scheme, $root);
    }
897256
public function writeXml(DOMDocument $dom = null)
    {
        $countConditions = $this->getConditions()->count();

        if ($countConditions > 0) {
            $descriptor = $dom->createElement('conditions');

            if ($countConditions > 1) {
                $type = $this->getType();
                if (null === $type) {
                    $errMsg = 'Некорректное значение для атрибута type';
                    throw new InvalidDescriptorException($errMsg);
                }
                $descriptor->setAttribute('type', $type);
            }

            foreach ($this->getConditions() as $condition) {
                $conditionDescriptor = $condition->writeXml($dom);
                $descriptor->appendChild($conditionDescriptor);
            }

            return $descriptor;
        }

        return null;
    }
40894
private function createDocument($root = null)
    {
        $document = new \DOMDocument($this->version, $this->encoding);
        $document->formatOutput = $this->formatOutput;

        $this->node = $document->createElement($root ?: $this->root);
        $document->appendChild($this->node);

        return $document;
    }
62018
private function checkIrregularSuffix($root, $irregular) {
		foreach ($irregular as $pattern => $result) {
			$searchPattern = '/' . $pattern . '$/i';
			if ($root !== $replacement = preg_replace($searchPattern, $result, $root)) {
				return $replacement;
			}
		}

		return null;
	}
428364
private function getPathsData($data, string $root): ?array
    {
        if ($data === null || !\is_array($data) || \count($data) === 0) {
            return null;
        }

        return $this->existingPaths($data, $root);
    }
430916
protected function getRootUrl( $scheme, $root = null )
	{
		if ( is_null( $root ) )
		{
			if ( is_null( $this->cachedRoot ) )
			{
				$this->cachedRoot = $this->forcedRoot ?: $this->request->root();
			}

			$root = $this->cachedRoot;
		}

		$start = Str::startsWith( $root, 'http://' ) ? 'http://' : 'https://';

		return preg_replace( '~' . $start . '~', $scheme, $root, 1 );
	}
144462
protected function getOptions($root = null)
    {
        $_SERVER['DOCUMENT_ROOT'] .= $this->getBaseUrl();

        if ($root) {
            $_SERVER['DOCUMENT_ROOT'] .= $root;
        }

        return array(
            // Output an array of data instead of returning headers/content.
            'quiet' => true,

            // In debug mode, allow access to all files, in case assets are symlinked to Bower repos for example.
            'minApp' => array('allowDirs' =>  $this->get('kernel')->isDebug() ? array('/') : array(
                // Allow all files inside the Symfony root folder to be accessed, in case asset files are symlinked to it.
                __DIR__ . '/../../../../../../',

                // Allow files in the configured combo-root to be accessed.
                $_SERVER['DOCUMENT_ROOT']
            )),

            // CSS URIs are rewritten. Don't minify JavaScript, we're just providing a combo service.
            'minifiers' => array(
                \Minify::TYPE_CSS => array('Rednose\ComboHandlerBundle\Controller\MinifyController', 'rewriteUris'),
                \Minify::TYPE_JS  => '',
            ),

            'minifierOptions' => array(
                \Minify::TYPE_CSS => array('baseUrl' => $this->getBaseUrl().$root)
            )
        );
    }