setNamespace example

if ($this->silent) {
                $this->cliMessages[] = "\t" . CLI::color($message, 'red');

                return false;
            }

            throw new RuntimeException($message);
        }

        $method = 'up';
        $this->setNamespace($migration->namespace);

        foreach ($this->getHistory($this->group) as $history) {
            if ($this->getObjectUid($history) === $migration->uid) {
                $method             = 'down';
                $migration->history = $history;
                break;
            }
        }

        if ($method === 'up') {
            $batch = $this->getLastBatch() + 1;

            

    public function __construct($event$namespace = null, $plugin = null, $listener = null, $position = null)
    {
        if ($namespace !== null) {
            $this->setNamespace($namespace);
        }
        if ($plugin !== null) {
            $this->setPlugin($plugin);
        }
        if ($listener !== null) {
            $this->setListener($listener);
        }
        parent::__construct($event);
        $this->setPosition($position);
    }

    
$idToken2 = $this->scanner->reconsumeCurrentTokenInJSXMode();
            if (!$idToken2 || $idToken2->type !== Token::TYPE_JSX_IDENTIFIER) {
                $this->error();
            }
            $this->scanner->consumeToken();
            
            $idNode2 = $this->createJSXNode("JSXIdentifier", $idToken2);
            $idNode2->setName($idToken2->value);
            $idNode2 = $this->completeNode($idNode2);
            
            $node = $this->createJSXNode("JSXNamespacedName", $idToken);
            $node->setNamespace($idNode);
            $node->setName($idNode2);
            return $this->completeNode($node);
            
        }
        
        //Get following identifiers         $nextIds = array();
        if ($allowMember) {
            while ($this->scanner->consume(".")) {
                $nextId = $this->scanner->reconsumeCurrentTokenInJSXMode();
                if (!$nextId || $nextId->type !== Token::TYPE_JSX_IDENTIFIER) {
                    
/** * Regress migrations as defined by the class */
    protected function regressDatabase()
    {
        if ($this->migrate === false) {
            return;
        }

        // If no namespace was specified then rollback all         if (empty($this->namespace)) {
            $this->migrations->setNamespace(null);
            $this->migrations->regress(0, 'tests');
        }

        // Regress each specified namespace         else {
            $namespaces = is_array($this->namespace) ? $this->namespace : [$this->namespace];

            foreach ($namespaces as $namespace) {
                $this->migrations->setNamespace($namespace);
                $this->migrations->regress(0, 'tests');
            }
        }

        $runner = Services::migrations();
        $runner->clearCliMessages();

        CLI::write(lang('Migrations.latest'), 'yellow');

        $namespace = $params['n'] ?? CLI::getOption('n');
        $group     = $params['g'] ?? CLI::getOption('g');

        try {
            if (array_key_exists('all', $params) || CLI::getOption('all')) {
                $runner->setNamespace(null);
            } elseif ($namespace) {
                $runner->setNamespace($namespace);
            }

            if ($runner->latest($group)) {
                CLI::error(lang('Migrations.generalFault'), 'light_gray', 'red'); // @codeCoverageIgnore             }

            $messages = $runner->getCliMessages();

            foreach ($messages as $message) {
                


    /** * @return Configuration */
    public function setCache(CacheProvider $cache)
    {
        // Set namespace for doctrine cache provider to avoid collisions         $namespace = $this->cacheNamespace !== null ? $this->cacheNamespace : md5(
            $this->getProxyDir() . $this->release->getRevision()
        );
        $cache->setNamespace('dc2_' . $namespace . '_');

        $this->setMetadataCacheImpl($cache);
        $this->setQueryCacheImpl($cache);
        $this->setResultCacheImpl($cache);

        return $this;
    }

    /** * @return CacheProvider|null */
    
if (APP_NAMESPACE !== 'App' && $namespace === 'App') {
                continue; // @codeCoverageIgnore             }

            $migrations = $runner->findNamespaceMigrations($namespace);

            if (empty($migrations)) {
                continue;
            }

            $runner->setNamespace($namespace);
            $history = $runner->getHistory((string) $paramGroup);
            ksort($migrations);

            foreach ($migrations as $uid => $migration) {
                $migrations[$uid]->name = mb_substr($migration->name, mb_strpos($migration->name, $uid . '_'));

                $date  = '---';
                $group = '---';
                $batch = '---';

                foreach ($history as $row) {
                    
Home | Imprint | This part of the site doesn't use cookies.