Mixin Notifier

This function is called when the mixin is being mixed. It will get the mixer passed in.

@param KObjectMixable $mixer The mixer object
@return void
427733
public function onMixin(KObjectMixable $mixer)
    {
        parent::onMixin($mixer);

        //Set max age default
        if($this->isCacheable()) {
            $this->getMixer()->getResponse()->setMaxAge($this->getConfig()->cache_time, $this->getConfig()->cache_time_shared);
        }
    }
409551
public function setValue($mixValue){
		if(is_null($mixValue)){
			$this->mixValue = null;
			return true;
		}

		$strClass = $this->options()->class;
		$this->mixValue = new $strClass($mixValue);
	}
1128628
private function composition($receiver, stdClass $message)
    {
        if(!$this->broadcast)
        {
            $this->typing($receiver);
            
            sleep($this->manager->composition($message));

            $this->paused($receiver);
        }
    }
974488
function addMixins(mixins, target, inherits, isNOTExtendingNative) {
    for (var
      source,
      init = [],
      i = 0; i < mixins.length; i++
    ) {
      source = transformMixin(mixins[i]);
      if (hOP.call(source, INIT)) {
        init.push(source[INIT]);
      }
      copyOwn(source, target, inherits, false, false, isNOTExtendingNative);
    }
    return init;
  }
929055
protected function setMixins(Metadata\Interfaces\MixinInterface $metadata, array $mixins)
    {
        foreach ($mixins as $mixinName) {
            $mixinMeta = $this->loadMetadataForMixin($mixinName);
            if (null === $mixinMeta) {
                continue;
            }
            $metadata->addMixin($mixinMeta);
        }
        return $metadata;
    }
369404
protected function _initialize(KObjectConfig $config)
    {
        $config->append(array(
            'parameters' => array(),
            'filters'    => array(),
            'functions'  => array(
                'escape'     => array($this, 'escape'),
                'helper'     => array($this, 'invoke'),
                'parameters' => array($this, 'getParameters')
            ),
            'cache'           => false,
            'cache_namespace' => 'koowa',
            'excluded_types'  => array('html'),
        ));

        parent::_initialize($config);
    }
40674
@Override
    public final void initialize(MixinImplementor mixinImplementor) {
        checkState(this.mixinImplementor == null, "Re-entry is not allowed.");

        this.mixinImplementor = checkNotNull(mixinImplementor, "mixinImplementor");
        try {
          initialize();
        }
        finally {
            this.mixinImplementor = null;
        }
    }
33926
protected function initialize($mixed) {
								
		if(is_a($mixed, 'Guzzle\Http\Message\Response')) {			
			$this->href = strval($mixed->getHeader('Location'));
			
			$json_obj = json_decode($mixed->getBody(true));
			if($json_obj) {
				$this->_castInputParametersWithClosure($json_obj);
			}
		}
		
		if(is_a($mixed, 'SimpleXMLElement')) {			
			$this->_castInputParametersWithClosure(get_object_vars($mixed));
		}
		
		if(is_a($mixed, 'stdClass')) {
			$this->_castInputParametersWithClosure(get_object_vars($mixed));
		}
		
		if(is_a($mixed, 'RGeyer\Guzzle\Rs\Model\ModelBase')) {
			$this->_params = array_merge($this->_params, $mixed->_params);
		}
		
		if(isset($this->_params['links'])) {
			foreach($this->links as $link) {
				if($link->rel == 'self') {
					$this->href = $link->href;
				}
			}
		}
		
		if($this->href) {
			$this->id = $this->_castIdWithClosure($this->getIdFromHref($this->href));
		}
	}
419002
function mixable(obj, recursive) {
  if (obj == null) {
    obj = {};
  }
  if (recursive == null) {
    recursive = true;
  }
  // Do not override the mixin function, even it is not mine.
  if (isPrimitive(obj) || obj.mixin != null) {
    return obj;
  }
  // Recursively make the prototypes mixable.
  if (recursive && (obj.prototype != null)) {
    mixable(obj.prototype);
  }
  // The common mixin.
  defineProp(obj, 'mixin', {
    configurable: true,
    enumerable: false,
    value: mixin
  });
  return obj;
}
1252732
private void startElementMixin(final Attributes attributes) {

        LOG.debug("Found mixin declaration");
        try {
            this.addMixin(this.nodeStack.peek(), attributes);
        } catch (final RepositoryException e) {
            throw new AssertionError("Could not add mixin type", e);
        }
    }
126564
function() {
		if(this.init) { this.init.apply(this, arguments) }
		for (var i=0, mixin; mixin = mixins[i]; i++) {
			if (mixin.init) { mixin.init.apply(this) }
		}
	}
877355
function componentMixin(tag$$1) {
      var mixins = [], len = arguments.length - 1;
      while ( len-- > 0 ) mixins[ len ] = arguments[ len + 1 ];

      each(mixins, function (mix) {
        var instance;
        var obj;
        var props = [];

        // properties blacklisted and will not be bound to the tag instance
        var propsBlacklist = ['init', '__proto__'];

        mix = isString(mix) ? mixin(mix) : mix;

        // check if the mixin is a function
        if (isFunction$1(mix)) {
          // create the new mixin instance
          instance = new mix();
        } else { instance = mix; }

        var proto = Object.getPrototypeOf(instance);

        // build multilevel prototype inheritance chain property list
        do { props = props.concat(Object.getOwnPropertyNames(obj || instance)); }
        while (obj = Object.getPrototypeOf(obj || instance))

        // loop the keys in the function prototype or the all object keys
        each(props, function (key) {
          // bind methods to tag
          // allow mixins to override other properties/parent mixins
          if (!contains(propsBlacklist, key)) {
            // check for getters/setters
            var descriptor = getPropDescriptor(instance, key) || getPropDescriptor(proto, key);
            var hasGetterSetter = descriptor && (descriptor.get || descriptor.set);

            // apply method only if it does not already exist on the instance
            if (!tag$$1.hasOwnProperty(key) && hasGetterSetter) {
              Object.defineProperty(tag$$1, key, descriptor);
            } else {
              tag$$1[key] = isFunction$1(instance[key]) ?
                instance[key].bind(tag$$1) :
                instance[key];
            }
          }
        });

        // init method will be called automatically
        if (instance.init)
          { instance.init.bind(tag$$1)(tag$$1.opts); }
      });

      return tag$$1
    }
47812
public void initializeMixer()
	{
		// to be a bit faster, we do some precalculations
		calculateGlobalTuning();
		
		// get Mod specific values
		frequencyTableType = mod.getFrequencyTable();
		currentTempo = mod.getTempo();
		currentBPM = mod.getBPMSpeed();
		globalVolume = mod.getBaseVolume();
		globalVolumSlideValue = 0;
		useFastSlides = mod.doFastSlides();
		
		samplePerTicks = calculateSamplesPerTick();
		
		currentTick = currentArrangement = currentRow = patternDelayCount = patternTicksDelayCount = 0;
		currentArrangement = 0;
		currentPatternIndex = mod.getArrangement()[currentArrangement];
		currentPattern = mod.getPatternContainer().getPattern(currentPatternIndex);
		
		patternJumpPatternIndex = patternBreakRowIndex = patternBreakJumpPatternIndex = -1;
		
		modFinished = false;
		
		calculateVolRampLen();
		
		// Reset all rowes played to false
		mod.resetLoopRecognition();

		// Reset FadeOut
		doFadeOut = false;
		fadeOutFac = 8;
		fadeOutValue = 1<<fadeOutFac;
		fadeOutSub = 0x01;
		
		final int nChannels = mod.getNChannels();
		// Now initialize every used channel
		for (int c=0; c<maxChannels; c++)
		{
			channelMemory[c] = new ChannelMemory();
			
			if (c<nChannels)
			{
				final ChannelMemory aktMemo = channelMemory[c];
				aktMemo.panning = mod.getPanningValue(c);
				aktMemo.channelVolume = mod.getChannelVolume(c); 
				initializeMixer(c, aktMemo);
			}
		}
	}
389981
protected function _initialize(KObjectConfig $config)
    {
        $config->append(array(
            'priority'   => self::PRIORITY_LOW,
            'template'   => JFactory::getApplication()->getTemplate()
        ));

        parent::_initialize($config);
    }
557103
public function setValue($mixValue){
		if($this->isValid($mixValue) || is_null($mixValue)){
			$this->mixValue = $mixValue;
			return true;
		}

		throw new TypeException($mixValue, get_class($this));
	}
127467
protected function _initialize(KObjectConfig $config)
    {
        $config->append(array(
            'priority' => self::PRIORITY_LOW,
            'title'    => '',
            'class'    => '',
            'styles'   => array(),
            'attribs'  => array(
                'name'  => $this->getIdentifier()->package . '_' . $this->getIdentifier()->name,
                'first' => null,
                'last'  => null,
            )
        ));

        parent::_initialize($config);
    }
685832
protected function mix($config, $mix) {
		for ($i = 0; $i < count($mix); $i++) {
			if ($config->is_field($mix[$i]['name'])===-1) {
				$config->add_field($mix[$i]['name']);
			}
		}
	}