~ Methods **************************************************************************************************************************************
176166
@Override
    public Response toResponse(WebApplicationException ex) {
        return Response.status(ex.getResponse().getStatus()).entity(new ErrorMessage(ex.getResponse().getStatus(), ex.getMessage())).type(
            MediaType.APPLICATION_JSON_TYPE).build();
    }
1235264
public function init() {

		parent::init();

		$this->categoryService	= Yii::$app->factory->get( 'categoryService' );

		if( !isset( $this->siteId ) ){

			$this->siteId = Yii::$app->core->siteId;
		}
	}
810772
public function initialize()
    {
        if ($this->initialized || ! $this->association) {
            return;
        }

        $this->doInitialize();

        $this->initialized = true;
    }
970680
public function init()
    {
        if ($this->countRows < 1) {
            $this->totalPages = 0;
            $this->currentPage = 0;

            return;
        }

        if ($this->limit < 10) {
            $this->limit = 10;
        }

        $this->totalPages = (int)($this->countRows / $this->limit);

        if ($this->countRows % $this->limit) {
            $this->totalPages++;
        }

        if ($this->totalPages === 0) {
            $this->totalPages = 1;
        }

        if ($this->currentPage < 0) {
            $this->currentPage = 0;
        }

        if ($this->currentPage > $this->totalPages) {
            $this->currentPage = $this->totalPages;
        }
    }
1374179
public function process()
    {
        parent::process();

        if ($this->value === null) {
            return;
        }

        $float_value = $this->getNumericValue($this->value);

        if ($float_value === null) {
            $this->addMessage($this->getValidationMessage('float'));
        } else {
            $this->value = $float_value;
        }
    }
328688
public function execute()
    {
        if (!$this->isEmpty()) {
            $this->table->update($this->context + $this->values, $this->where)->run();
        }

        parent::execute();
    }
1183651
public function Bind()
	{
		$this->getAbstractNode(0)->Bind();
		/**
		 * @var QName $qname
		 */
		$qname = $this->getQNVarName();
		$this->_varRef = $this->getContext()->RunningContext->NameBinder->PushVar( $qname );
		$this->getAbstractNode(1)->Bind();
		$this->getContext()->RunningContext->NameBinder->PopVar();
	}
89360
public function init(): void
    {
        parent::init();

        if (!isset($this->imageOptions['id'])) {
            $this->imageOptions['id'] = $this->options['id'] . '-image';
        }
    }
4503
public function process()
    {
        parent::process();

        $areas_flydown = $this->getCompositeWidget('areas_flydown');
        $regions_flydown = $this->getCompositeWidget('regions_flydown');

        if ($areas_flydown->value === 'UTC') {
            $this->value = 'UTC';
        } elseif (
            $areas_flydown->value === null ||
            $regions_flydown->value === null
        ) {
            $this->value = null;
        } else {
            $this->value =
                $areas_flydown->value . '/' . $regions_flydown->value;
        }

        if (!$this->required && $this->value === null && $this->isSensitive()) {
            return;
        } elseif ($this->value === null) {
            $message = Swat::_('The %s field is required.');
            $this->addMessage(new SwatMessage($message, 'error'));
        } else {
            try {
                $time_zone = new DateTimeZone($this->value);
            } catch (Exception $e) {
                $message = Swat::_('The %s field is an invalid time zone.');
                $this->addMessage(new SwatMessage($message, 'error'));
            }
        }
    }
104400
public function init() {
        $this->_req = $this->getRequest()->getParam('request');
        $this->_response = $this->getRequest()->getParam('response');
    }
174986
@Override
    public synchronized void dispatch(@NonNull Event event) {
        String type = event.type;
        List<EventHandlerWrapper> eventHandlers = subscribers.get(type);
        if (eventHandlers != null) {
            EventHandlerWrapper handler = null;
            for (int i = 0, size = eventHandlers.size(); i < size; i++) {
                handler = eventHandlers.get(i);
                if (handler.eventHandlerReceiver != null) {
                    handler.handleEvent(event);
                } else {
                    if (!TextUtils.isEmpty(handler.producer) && handler.producer.equals(event.sourceId)
                            || TextUtils.isEmpty(handler.producer)) {
                        handler.handleEvent(event);
                    }
                }
            }
        }
    }
331966
@Override
    public void setMethod(byte[] method) throws UnsupportedMethodException {
        MethodValues val = MethodValues.match(method, 0, method.length);
        if (null == val) {
            throw new UnsupportedMethodException("Illegal method " + GenericUtils.getEnglishString(method));
        }
        setMethod(val);
    }
214308
public function process()
    {
        if (!$this->getForm()->isSubmitted()) {
            return;
        }

        parent::process();

        $this->processValues();

        if (
            $this->required &&
            count($this->values) == 0 &&
            $this->isSensitive()
        ) {
            $this->addMessage($this->getValidationMessage('required'));
        }
    }
585670
private void initBeforeList() {
        final List<ProcessAdvice> beforeRequestProcessAdvices = new ArrayList<>();

        final Method invokeHolder = getInvokeHolder();
        final Class<?> processorClass = invokeHolder.getDeclaringClass();

        // 1. process class advice
        if (null != processorClass && processorClass.isAnnotationPresent(Before.class)) {
            final Class<? extends ProcessAdvice>[] bcs = processorClass.getAnnotation(Before.class).value();
            for (int i = 0; i < bcs.length; i++) {
                final Class<? extends ProcessAdvice> bc = bcs[i];
                final ProcessAdvice beforeRequestProcessAdvice = BeanManager.getInstance().getReference(bc);
                beforeRequestProcessAdvices.add(beforeRequestProcessAdvice);
            }
        }
        // 2. process method advice
        if (invokeHolder.isAnnotationPresent(Before.class)) {
            final Class<? extends ProcessAdvice>[] bcs = invokeHolder.getAnnotation(Before.class).value();
            for (int i = 0; i < bcs.length; i++) {
                final Class<? extends ProcessAdvice> bc = bcs[i];
                final ProcessAdvice beforeRequestProcessAdvice = BeanManager.getInstance().getReference(bc);
                beforeRequestProcessAdvices.add(beforeRequestProcessAdvice);
            }
        }

        this.beforeRequestProcessAdvices = beforeRequestProcessAdvices;
    }
1365223
public function push($value)
    {
        if (!$this->current->value) {
            $this->current->value = $value;
        } else {
            $temp = $this->current;
            $this->current = new ClassNode($value, $temp->prev);
            $this->current->next = $temp;
            $temp->prev = $this->current;
            if ($temp === $this->head) {
                $this->head = $this->current;
            } else {
                $this->current->prev->next = $this->current;
            }
        }
    }
369377
private void init() {
        writers.put(Boolean.class, new BooleanDataWriter());
        writers.put(Calendar.class, new CalendarDataWriter());
        writers.put(Date.class, new DateDataWriter());
        writers.put(Enum.class, new EnumDataWriter());
        writers.put(Number.class, new NumberDataWriter());
        writers.put(String.class, new StringDataWriter());
    }
759689
public function init()
    {
        $this->renameTableQueries = array();
        $this->dropCheckQueries = array();
        $this->dropForeignKeyQueries = array();
        $this->dropIndexQueries = array();
        $this->dropPrimaryKeyQueries = array();
        $this->dropColumnQueries = array();
        $this->alterColumnQueries = array();
        $this->createColumnQueries = array();
        $this->createPrimaryKeyQueries = array();
        $this->createIndexQueries = array();
        $this->createForeignKeyQueries = array();
        $this->createCheckQueries = array();
    }