lib/D4rk4ng3l/Oxid/Module/Generator.php
public function addMapping(Mapping $mapping)
    {
        $oxidClass   = $mapping->getOxidClass();
        $oxidMethod  = $mapping->getOxidMethod();
        $moduleClass = $mapping->getModuleClass();
        $moduleFile  = $mapping->getModuleFile();

        if (!isset($this->mappings[$oxidClass])) {
            $this->mappings[$oxidClass] = array();
        }

        $needNewProxy = true;
        foreach ($this->mappings[$oxidClass] as $proxyClass => $classMethods) {
            if (!isset($classMethods[$oxidMethod])) {
                $this->setMapping($oxidClass, $proxyClass, $oxidMethod, $moduleFile, $moduleClass, $mapping);
                $needNewProxy = false;
                break;
            }
        }

        if ($needNewProxy) {
            $proxyClass = (count($this->mappings[$oxidClass]) + 1);
            $this->setMapping($oxidClass, $proxyClass, $oxidMethod, $moduleFile, $moduleClass, $mapping);
        }

        return $this;
    }
public function addMapping(Mapping $mapping)
    {
        $oxidClass   = $mapping->getOxidClass();
        $oxidMethod  = $mapping->getOxidMethod();
        $moduleClass = $mapping->getModuleClass();
        $moduleFile  = $mapping->getModuleFile();

        if (!isset($this->mappings[$oxidClass])) {
            $this->mappings[$oxidClass] = array();
        }

        $needNewProxy = true;
        foreach ($this->mappings[$oxidClass] as $proxyClass => $classMethods) {
            if (!isset($classMethods[$oxidMethod])) {
                $this->setMapping($oxidClass, $proxyClass, $oxidMethod, $moduleFile, $moduleClass, $mapping);
                $needNewProxy = false;
                break;
            }
        }

        if ($needNewProxy) {
            $proxyClass = (count($this->mappings[$oxidClass]) + 1);
            $this->setMapping($oxidClass, $proxyClass, $oxidMethod, $moduleFile, $moduleClass, $mapping);
        }

        return $this;
    }
@param Mapping $mapping

@return $this