@param \Interpro\Core\Contracts\Ref\ARef $ref

@return void
190337
public function delete(ARef $ref)
    {
        $type = $ref->getType();
        $type_name = $type->getName();

        $id = $ref->getId();

        $type_rank = $type->getRank();

        //[[[
        DB::beginTransaction();

        //Удаление внешних собственных полей
        $this->deleteOwns($ref);

        //Сообщение ссылающимся, об удалении сущности
        //При удаленнии блока формы или общего блока feedback, подчиненные удаляются через разруливание ссылок Interpro\Feedback\Executors\RefConsistExecutor
        $this->refConsistMediator->notify($ref);

        if($type_rank === TypeRank::BLOCK)
        {
            Fbform::where('name', '=', $type_name)->delete();
        }
        elseif($type_rank === TypeRank::GROUP)
        {
            $suffix_pos = strripos($type_name, '_');

            if($suffix_pos)
            {
                $suffix = substr($type_name, $suffix_pos+1);

                if($suffix === 'mail')
                {
                    Fbmail::where('name', '=', $type_name)->where('id', '=', $id)->delete();
                }
                elseif($suffix === 'mailto')
                {
                    Fbmailto::where('name', '=', $type_name)->where('id', '=', $id)->delete();
                }
            }
            elseif($type_name === 'mailfromac')
            {
                Fbac::where('id', '=', $id)->delete();
            }
        }
        else
        {
            throw new FeedbackException('В деструкторе qs возможно удаление только сущностей ранга блок или группа, передано: '.$type->getName().'('.$type_rank.').');
        }

        DB::commit();
        //]]]
    }
788544
public function getRef($reference)
	{
		$ref = &self::_getArray();

		if (isset($ref[$reference]))
		{
			return $ref[$reference];
		}
		else
		{
			return false;
		}
	}
1103490
public function showCommit($ref)
    {
        $this->clearAll();

        $this->addCommandName(self::GIT_SHOW);
        $this->addCommandArgument('-s');
        $this->addCommandArgument('--pretty=raw');
        $this->addCommandArgument('--no-color');
        $this->addCommandSubject($ref);

        return $this->getCommand();
    }
393423
protected function resolveReference($ref)
	{
		// @todo Better resolver (Only work with internal components atm)
		if (strpos($ref, '#/components/') !== 0) {
			throw new Exception('Can not resolve this $ref atm (todo) : ' . $ref);
		}

		$componentPath = str_replace('#/components/', '', $ref);
		$pathParts = explode('/', $componentPath);

		$target = $this->openApiFileContent['components'];
		$processingPathParts = ['#', 'components'];
		$targetName = '';
		foreach ($pathParts as $pathPart) {
			$processingPathParts[] = $pathPart;
			if (!isset($target[$pathPart])) {
				throw new Exception('Can not resolve $ref "' . $ref . '" : Segment not found at "' . implode('/', $processingPathParts) . '"');
			}
			$target = $target[$pathPart];
			$targetName = $pathPart;
		}

		return [
			'name' => $targetName,
			'target' => $target
		];
	}
1319233
public static function handler($iSignal) {

		if (self::$bExit) {
			return;
		}

		switch($iSignal) {
			case SIGTERM:
			case SIGKILL:
			case SIGINT:
				self::$bExit = TRUE;
				break;
			default:
				break;
		}
	}
237282
public function commit(): void
    {
        if (null !== $this->changes) {
            $this->commitInternal($this->changes);

            $this->changes = null;
        }
    }
1297951
public function isMultiReferences($reference)
    {
        $count = 0;
        if ($reference) {
            // check foreign keys
            $count += $this->getForeignKeyReferenceCount($reference);
            // check relations
            $count += $this->getRelationReferenceCount($reference);
        }

        return $count > 1 ? true : false;
    }
32259
private function removeRsfhrParam($ref)
	{
		$session = \System::getContainer()->get('session');
		if (!$session->isStarted()) {
			return;
		}

		$referrerSession = $session->get('referer');
		if (!empty($referrerSession[$ref]['current'])) {
			$referrerSession[$ref]['current'] = preg_replace('(([&?])rsfhr=1(&|$))', '$1', $referrerSession[$ref]['current']);
			$session->set('referer', $referrerSession);
		}
	}
1346592
public function setRefid(Reference $r)
    {
        if ($this->path !== null) {
            throw $this->noChildrenAllowed();
        }

        $this->refid = $r;
    }
327736
public function exist(ARef $ref)
    {
        $family = $ref->getType()->getFamily();

        $refConsistExecutor = $this->getRefConsistExecutor($family);

        return $refConsistExecutor->exist($ref);
    }
60112
public function registerReference(Reference $reference)
    {
        $name = $reference->getName();
        $this->references[$name] = $reference;
    }
1175334
public function exist(ARef $ref)
    {
        $type = $ref->getType();
        $type_name = $type->getName();

        $id = $ref->getId();

        $type_rank = $type->getRank();

        if($type_rank === TypeRank::BLOCK)
        {
            $collection = Fbform::where('name', $type_name)->get();
        }
        elseif($type_rank === TypeRank::GROUP)
        {
            $suffix_pos = strripos($type_name, '_');

            if($suffix_pos)
            {
                $suffix = substr($type_name, $suffix_pos+1);

                if($suffix === 'mail')
                {
                    $collection = Fbmail::where('name', '=', $type_name)->where('id', '=', $id)->get();
                }
                elseif($suffix === 'mailto')
                {
                    $collection = Fbmailto::where('name', '=', $type_name)->where('id', '=', $id)->get();
                }
                else
                {
                    throw new FeedbackException('Не корректный суффикс '.$type_name.' ссылки!');
                }
            }
            elseif($type_name === 'mailfromac')
            {
                $collection = Fbac::where('id', '=', $id)->get();
            }
            else
            {
                throw new FeedbackException('Имя типа '.$type_name.' не поддерживается!');
            }
        }
        else
        {
            throw new FeedbackException('Не корректный ранг типа '.$type_name.' ссылки!');
        }

        return !$collection->isEmpty();
    }
763045
public function resolveReferences(ReferenceContext $context = null)
    {
        foreach ($this->_properties as $property => $value) {
            if ($value instanceof Reference) {
                $this->_properties[$property] = $value->resolve($context);
            } elseif ($value instanceof SpecObjectInterface) {
                $value->resolveReferences($context);
            } elseif (is_array($value)) {
                foreach ($value as $k => $item) {
                    if ($item instanceof Reference) {
                        $this->_properties[$property][$k] = $item->resolve($context);
                    } elseif ($item instanceof SpecObjectInterface) {
                        $item->resolveReferences($context);
                    }
                }
            }
        }
    }
1295638
public function setReference($value)
    {
        $this->_validateNotNull('Reference', $value);
        $this->_validateString('Reference', $value);

        if ($this->data['reference'] === $value) {
            return;
        }

        $this->data['reference'] = $value;

        $this->_setModified('reference');
    }
1094770
public function addAll()
    {
        // Make sure refs are not null any more, else it keeps checking on every static ref
        $this->refs = [];

        /** @var StaticReference $repos */
        $references = $this->em->getRepository('ZichtUrlBundle:StaticReference')->getAll($this->getLocale());

        foreach ($references as $static_reference) {
            foreach ($static_reference->getTranslations() as $translation) {
                $this->refs[$static_reference->getMachineName()][$translation->getLocale()] = $translation->getUrl();
            }
        }
    }
1090711
public function setMultiple($isMultiple)
    {
        
    	$this->getImplementation()->setMultiple($this, $isMultiple);
    	$this->multiple = $isMultiple;
        
    }
339231
public function update(ARef $ref, OwnField $own, $value)
    {
        $type          = $ref->getType();
        $type_name     = $type->getName();
        $id            = $ref->getId();
        $own_type_name = $own->getFieldTypeName();
        $own_name      = $own->getName();

        if($own_type_name !== 'seo')
        {
            throw new UpdateException('Seo не обрабатывает тип '.$own_type_name);
        }

        if(!is_string($value))
        {
            $value = '';
            //throw new UpdateException('Seo поле '.$own_name.' типа '.$own_type_name.' должно быть задано строкой!');
        }

        $field = Seo::firstOrNew(['entity_name' => $type_name, 'entity_id' => $id, 'name' => $own_name]);

        $field->value = $value;
        $field->save();
    }