Enables Repo "inheritance" allowing multiple repos to share one storage table
You will need to call setRootRepo on all the child repos.

@param  boolean      $inherited
@return Config $this
330052
public function setInherited($inherited)
    {
        $this->inherited = (bool) $inherited;

        if ($inherited) {
            if (! $this->reflectionModel->isRoot()) {
                $rootRepo = Container::get($this->reflectionModel->getRoot()->getName());
                $this->rootConfig = $rootRepo->getConfig();
            }

            $this->table = $this->rootConfig->getTable();
        }

        return $this;
    }
1253467
public function inherit() {
    
    if ((bool)Config::getOption("plugins.dataInheritance.enabled")) {
      
      $storeData        = Data::get();
      $storePatternData = PatternData::get();
      
      foreach ($storePatternData as $patternStoreKey => $patternData) {
        
        if (isset($patternData["lineages"]) && (count($patternData["lineages"]) > 0)) {
          
          $dataLineage = array();
          
          foreach($patternData["lineages"] as $lineage) {
            
            // merge the lineage data with the lineage store. newer/higher-level data is more important.
            $lineageKey  = $lineage["lineagePattern"];
            $lineageData = isset($storeData["patternSpecific"][$lineageKey]) && isset($storeData["patternSpecific"][$lineageKey]["data"]) ? $storeData["patternSpecific"][$lineageKey]["data"] : array();
            if (!empty($lineageData)) {
              $dataLineage = array_replace_recursive($dataLineage, $lineageData);
            }
            
          }
          
          // merge the lineage data with the pattern data. pattern data is more important.
          $dataPattern = isset($storeData["patternSpecific"][$patternStoreKey]) && isset($storeData["patternSpecific"][$patternStoreKey]["data"]) ? $storeData["patternSpecific"][$patternStoreKey]["data"] : array();
          $dataPattern = array_replace_recursive($dataLineage, $dataPattern);
          
          if (!empty($dataPattern)) {
            $storeData["patternSpecific"][$patternStoreKey]["data"] = $dataPattern;
          }
          
        }
        
      }
      
      Data::replaceStore($storeData);
      
    }
    
  }
85182
public function setExtension(string $extension) {
        if(!$this->setModified('extension', $extension)->isModified()) {
            return $this;
        }
		$this->extension = $extension;
		return $this;
    }
1130783
public function setVersion($version)
    {
        if (!in_array($version, $this->supportedVersions)) {
            $this->throwError('The version ' . $version . ' is not supported by this library');
        }

        $this->version = $version;

        return $this;
    }
89968
public function setPathToProjectRoot(string $pathToProjectRoot): AbstractGenerator
    {
        $realPath = \realpath($pathToProjectRoot);
        if (false === $realPath) {
            throw new \RuntimeException('Invalid path to project root ' . $pathToProjectRoot);
        }
        $this->pathToProjectRoot = $realPath;

        return $this;
    }
164624
protected function inheritFromParent(BaseQuery $parent)
    {
        parent::inheritFromParent($parent);

        if ($parent instanceof Select) {
            $parent->copyTo($this);
        } 
    }
204841
public function setEnabled($state = true)
    {
        $this->enabled = (bool) $state;

        if ($this->enabled) {
            try {
                $this->createNamespace();
            } catch (Exception $ex) {
                throw new RuntimeException(sprintf(
                    'Failed to enable the cache adapter of class "%s" '
                    . 'with namespace "%s".',
                    static::CLASS,
                    $this->namespace
                ), null, $ex);
            }
        }

        return $this;
    }
901819
public function setFamily($family)
    {
        if (!isset($this->config[$family])) {
            throw new UnknownFamilyMeasureException();
        }

        $this->family = $family;

        return $this;
    }
808221
public function ancestors($includeSelf = false, $depth = null)
    {
        $this
            ->getQuerySet()
            ->ancestors($includeSelf, $depth);

        return $this;
    }
1259743
final protected function extendRepositoryMapping()
    {
        $app = $this->getContainer();

        $app['storage'] = $app->share(
            $app->extend(
                'storage',
                function ($entityManager) use ($app) {
                    foreach ($this->registerRepositoryMappings() as $alias => $map) {
                        if (Arr::isIndexed($map)) {
                            // Usually caused by [entity, repo] instead of [entity => repo]
                            throw new \RuntimeException(sprintf('Repository mapping for %s `%s` is not an associative array.', __CLASS__, $alias));
                        }
                        $app['storage.repositories'] += $map;
                        $app['storage.metadata']->setDefaultAlias($app['schema.prefix'] . $alias, key($map));
                        $entityManager->setRepository(key($map), current($map));
                        $entityManager->addEntityAlias($alias, key($map));
                    }

                    return $entityManager;
                }
            )
        );
    }
767792
public function setRelative($relative)
    {
        $this->relative = (bool)$relative;
        if (($this->relative) && ($this->isAbsolute())) {
            $this->setAbsolute(false);
        }
        return $this;
    }
1060217
public function prepareObject($class, $extend = null, $shared = false, $protected = false)
    {
        $handler = function (Container $container) use ($class) {
            return $container->newInstance($class);
        };

        $this->set($class, $handler, $shared, $protected);

        if (is_callable($extend)) {
            $this->extend($class, $extend);
        }

        return $this;
    }
67747
public function inheritEnvironmentVariables($inheritEnv = true)
    {
        @trigger_error(sprintf('The %s() method is deprecated since version 3.3 and will be removed in 4.0.', __METHOD__), E_USER_DEPRECATED);

        $this->inheritEnv = $inheritEnv;

        return $this;
    }
1052408
public function setBaseFetch($baseFetch)
    {
        if (is_callable($baseFetch)) {
            $baseFetch = $baseFetch($this->getBaseFetch(), $this);
        }
        $this->baseFetch = $baseFetch;
        return $this;
    }
343372
public function setHasRepository($hasRepository)
    {
        if (!is_bool($hasRepository)) {
            throw new \InvalidArgumentException('The attribute hasRepository on the class Entity has to be boolean (' . gettype($hasRepository) . ('object' === gettype($hasRepository) ? ' ' . get_class($hasRepository) : '') . ' given).');
        }

        $this->hasRepository = $hasRepository;

        return $this;
    }
1182493
private function setEntityRepository()
    {
        try {
            $this->_repository = $this->_em->getRepository(self::ENTITY_CLASSNAME);
        } catch (\Exception $e) {
            throw new CacheException('Enable to load the cache entity repository', null, $e);
        }

        return $this;
    }
528013
final protected function _setBaseEntropyOverride($toggle) {
        if (isset($this->_baseEntropyOverride)
           && is_bool($toggle)
        ) {
            $this->_baseEntropyOverride = $toggle;   
        }
    }