Подключение базовых классов

@throws Eresus_Exception_ComponentCorrupted
338078
private function initClasses()
	{
		$filename = $this->froot.'core/classes.php';
		if (is_file($filename))
		{
            /** @noinspection PhpIncludeInspection */
            include_once $filename;
		}
		else
		{
            throw new Eresus_Exception_ComponentCorrupted(
                sprintf('Classes file "%s" not found!', $filename));
		}
	}
326384
public function completeComponents(): void
    {
        $components = $this->getComponents();

        foreach ($components as $id => $component) {
            if (ArrayHelper::remove($component, 'podiumBridge', false)) {
                $component['podium'] = $this;
                $this->set($id, $component);
            }
        }
    }
345413
def leave_current_component
      begin
        @current_component.on_leave
      rescue FieldValidationException => fve
        alert fve.to_s
      end
      # NOTE this is required, since repaint will just not happen otherwise
      # Some components are erroneously repainting all, after setting this to true so it is 
      # working there. 
      @current_component.repaint_required true
      $log.debug " after on_leave STACKFLOW XXX #{@current_component.focussed}   #{@current_component.name}"
      @current_component.repaint
    end
649936
private void doUpdateComponent() throws PageException {

	admin.updateComponentDeepSearch(getBoolObject("admin", action, "deepSearch"));
	admin.updateBaseComponent(getString("admin", action, "baseComponentTemplateCFML"), getString("admin", action, "baseComponentTemplateLucee"));
	admin.updateComponentDumpTemplate(getString("admin", action, "componentDumpTemplate"));
	admin.updateComponentDataMemberDefaultAccess(getString("admin", action, "componentDataMemberDefaultAccess"));
	admin.updateTriggerDataMember(getBoolObject("admin", action, "triggerDataMember"));
	admin.updateComponentUseShadow(getBoolObject("admin", action, "useShadow"));
	admin.updateComponentDefaultImport(getString("admin", action, "componentDefaultImport"));
	admin.updateComponentLocalSearch(getBoolObject("admin", action, "componentLocalSearch"));
	admin.updateComponentPathCache(getBoolObject("admin", action, "componentPathCache"));
	store();
	adminSync.broadcast(attributes, config);
    }
912462
function unmountComponent(component) {
    if (options.beforeUnmount) options.beforeUnmount(component);

    var base = component.base;

    component._disable = true;

    if (component.componentWillUnmount) component.componentWillUnmount();

    component.base = null;

    // recursively tear down & recollect high-order component children:
    var inner = component._component;
    if (inner) {
      unmountComponent(inner);
    } else if (base) {
      if (base['__preactattr_'] && base['__preactattr_'].ref) base['__preactattr_'].ref(null);

      component.nextBase = base;

      removeNode(base);
      collectComponent(component);

      removeChildren(base);
    }

    if (component.__ref) component.__ref(null);
  }
725697
protected function component_class_callback_failed(\Throwable $e, string $component, string $interface,
            string $methodname, array $params) {
        if ($this->observer) {
            call_user_func_array([$this->observer, 'handle_component_failure'], func_get_args());
        }
    }
28148
protected function callChildComponent($component, IContext $context)
    {
        /**
         * @var IRouter $router
         */
        $router = $component->getRouter();
        $router->setBaseUrl($context->getRouteResult()->getMatchedUrl());

        $componentRequest = $this->createComponentRequest($context->getRouteResult()->getUnmatchedUrl());

        try {
            return $component->execute($componentRequest);
        } catch (\Exception $e) {
            return $this->callErrorController($e, $context);
        }
    }
221365
public function addComponent(Component $component)
	{
		$component->setParentComponent($this);
		$component->setFormComponent($this->formComponent);
		
		$this->components[$component->getName()] = $component;
		
		// Set value if there is one
		$component->setRequestData(is_array($this->inputData) && array_key_exists($component->getName(), $this->inputData) ? $this->inputData[$component->getName()] : null);
	}
403061
public void sendComponent(Component componentRequest) throws TCAPSendException {

        if (this.previewMode)
            return;

        if (this.provider.getStack().getStatisticsEnabled()) {
            switch (componentRequest.getType()) {
                case Invoke:
                    this.provider.getStack().getCounterProviderImpl().updateInvokeSentCount(this, (Invoke) componentRequest);

                    Invoke inv = (Invoke) componentRequest;
                    OperationCodeImpl oc = (OperationCodeImpl) inv.getOperationCode();
                    if (oc != null) {
                        this.provider.getStack().getCounterProviderImpl()
                                .updateOutgoingInvokesPerOperationCode(oc.getStringValue());
                    }
                    break;
                case ReturnResult:
                    this.provider.getStack().getCounterProviderImpl().updateReturnResultSentCount(this);
                    break;
                case ReturnResultLast:
                    this.provider.getStack().getCounterProviderImpl().updateReturnResultLastSentCount(this);
                    break;
                case ReturnError:
                    this.provider.getStack().getCounterProviderImpl().updateReturnErrorSentCount(this);

                    ReturnError re = (ReturnError) componentRequest;
                    ErrorCodeImpl ec = (ErrorCodeImpl) re.getErrorCode();
                    if (ec != null) {
                        this.provider.getStack().getCounterProviderImpl().updateOutgoingErrorsPerErrorCode(ec.getStringValue());
                    }
                    break;
                case Reject:
                    this.provider.getStack().getCounterProviderImpl().updateRejectSentCount(this);

                    Reject rej = (Reject) componentRequest;
                    ProblemImpl prob = (ProblemImpl) rej.getProblem();
                    if (prob != null) {
                        this.provider.getStack().getCounterProviderImpl().updateOutgoingRejectPerProblem(prob.getStringValue());
                    }
                    break;
            }
        }

        try {
            this.dialogLock.lock();
            if (componentRequest.getType() == ComponentType.Invoke) {
                InvokeImpl invoke = (InvokeImpl) componentRequest;

                // check if its taken!
                int invokeIndex = DialogImpl.getIndexFromInvokeId(invoke.getInvokeId());
                if (this.operationsSent[invokeIndex] != null) {
                    throw new TCAPSendException("There is already operation with such invoke id!");
                }

                invoke.setState(OperationState.Pending);
                invoke.setDialog(this);

                // if the Invoke timeout value has not be reset by TCAP-User
                // for this invocation we are setting it to the the TCAP stack
                // default value
                if (invoke.getTimeout() == TCAPStackImpl._EMPTY_INVOKE_TIMEOUT)
                    invoke.setTimeout(this.provider.getStack().getInvokeTimeout());
            } else {
                if (componentRequest.getType() != ComponentType.ReturnResult) {
                    // we are sending a response and removing invokeId from
                    // incomingInvokeList
                    this.removeIncomingInvokeId(componentRequest.getInvokeId());
                }
            }
            this.scheduledComponentList.add(componentRequest);
        } finally {
            this.dialogLock.unlock();
        }
    }
833374
private void resume() throws RepositoryException
   {
      WorkspaceResumer workspaceResumer = getWorkspaceResumer();
      if (workspaceResumer != null)
      {
         workspaceResumer.onResume();
      }

      // components should be resumed in reverse order
      List<Suspendable> components = getComponentInstancesOfType(Suspendable.class);
      Comparator<Suspendable> c = new Comparator<Suspendable>()
      {
         public int compare(Suspendable s1, Suspendable s2)
         {
            return s1.getPriority() - s2.getPriority();
         };
      };
      Collections.sort(components, c);

      for (Suspendable component : components)
      {
         try
         {
            if (component.isSuspended())
            {
               component.resume();
            }
         }
         catch (ResumeException e)
         {
            throw new RepositoryException("Can't set component online", e);
         }
      }
   }
739546
public function remove()
    {
        $mPrimaryKeyName = $this->_mPrimaryKeyName;
        $bInsertMode = false;

        if ($mPrimaryKeyName === false) {

            throw new Exception('['.__FILE__.' (l.'.__LINE__.'] no primary key on this table!');
        }
        else if (is_string($mPrimaryKeyName)) {

            $sMethodPrimaryKey = 'get_'.$this->_mPrimaryKeyNameWithoutMapping;
            $aPrimaryKey = array($mPrimaryKeyName => $this->$sMethodPrimaryKey());
        }
        else {

            $aPrimaryKey = array();

            foreach($mPrimaryKeyName as $sKey => $sPrimaryKey) {

                $sMethodPrimaryKey = 'get_'.$this->_mPrimaryKeyNameWithoutMapping[$sKey];
                $aPrimaryKey[$sPrimaryKey] = $this->$sMethodPrimaryKey();
            }
        }

        /**
         * check if the virtual foreign key in this model is respected
         */
        if (count($this->_aForeignKey) > 0) {

            foreach ($this->_aForeignKey as $sName => $aForeignKey) {

                if ($aForeignKey['has_one'] == 1 && isset($aForeignKey['foreign_key_options']['action'])
                    && $aForeignKey['foreign_key_options']['action'] == self::CASCADE) {

                    $sMethodPrimaryKey = 'get_'.$aForeignKey['foreign_key'];
                    $mFIeld = $this->$sMethodPrimaryKey();

                    if ($mFIeld) {

                        $oOrm = new Orm;

                        $iResults = $oOrm->select(array('*'))
                            ->from($aForeignKey['entity_join_name']);

                        $oWhere = new Where;

                        $oWhere->whereEqual($aForeignKey['primary_key_name'], $mFIeld);

                        $aResults = $oOrm->where($oWhere)
                            ->load();

                        if (count($aResults) > 0) {

                            $oOrm = new Orm;

                            $oOrm->delete($aForeignKey['entity_join_name'])
                                ->where($oWhere)
                                ->save();
                        }
                    }
                }
            }
        }

        $oOrm = new Orm;

        $oOrm->delete(preg_replace('/^.*\\\\([a-zA-Z0-9_]+)$/', '$1', get_called_class()))
            ->where($aPrimaryKey)
            ->save();

        return $this;
    }
566038
public void deleteComponent(String componentName) throws IOException {
    String path = RegistryUtils.componentPath(
        user, jstormServiceClass, instanceName,
        componentName);
    registryOperations.delete(path, false);
  }
1289529
public function getIndex ()
  {
    if (!isset($this->parent))
      throw new ComponentException($this, "The component is not attached to a parent.");
    if (!$this->parent->children)
      throw new ComponentException($this, "The parent component has no children.");

    return array_search ($this, $this->parent->children, true);
  }
314793
public function onKernelException(GetResponseForExceptionEvent $event): void
    {
        $exception = $event->getException();

        if (!$exception instanceof AccessDeniedException) {
            return;
        }

        $event->setException(new AccessDeniedHttpException($exception->getMessage(), $exception));
    }
556760
public function onExpandMarkupToken()
    {
        if (!$alias = post('tokenName')) {
            throw new ApplicationException(trans('cms::lang.component.no_records'));
        }

        // Can only expand components at this stage
        if ((!$type = post('tokenType')) && $type !== 'component') {
            return;
        }

        if (!($names = (array) post('component_names')) || !($aliases = (array) post('component_aliases'))) {
            throw new ApplicationException(trans('cms::lang.component.not_found', ['name' => $alias]));
        }

        if (($index = array_get(array_flip($aliases), $alias, false)) === false) {
            throw new ApplicationException(trans('cms::lang.component.not_found', ['name' => $alias]));
        }

        if (!$componentName = array_get($names, $index)) {
            throw new ApplicationException(trans('cms::lang.component.not_found', ['name' => $alias]));
        }

        $manager = ComponentManager::instance();
        $componentObj = $manager->makeComponent($componentName);
        $partial = ComponentPartial::load($componentObj, 'default');
        $content = $partial->getContent();
        $content = str_replace('__SELF__', $alias, $content);

        return $content;
    }
1374848
public static boolean updateComponentError(AbstractComponent component, ErrorMessage error) {

        if (component.getComponentError() != error) {
            component.setComponentError(error);
            return true;
        }
        return false;
    }
937553
protected function init() {
        if (!($this instanceof grade_exported)) {
            throw new Exception('grade_exported abstract is NOT extended by a valid component.');
        }
        $this->data['crud'] = 'r';
        $this->data['edulevel'] = self::LEVEL_TEACHING;
    }