src/Codeception/Module/WPDb.php
protected function scaffoldBlogTables($blogId, $domainOrPath, $isSubdomain = true)
    {
        $stylesheet = $this->grabOptionFromDatabase('stylesheet');
        $subdomain = $isSubdomain ?
            trim($domainOrPath, '.')
            : '';
        $subFolder = !$isSubdomain ?
            trim($domainOrPath, '/')
            : '';

        $data = [
            'subdomain' => $subdomain,
            'domain' => $this->getSiteDomain(),
            'subfolder' => $subFolder,
            'stylesheet' => $stylesheet,
        ];
        $dbh = $this->_getDbh();

        $dropQuery = $this->tables->getBlogDropQuery($this->config['tablePrefix'], $blogId);
        $sth = $dbh->prepare($dropQuery);
        $this->debugSection('Query', $sth->queryString);
        $dropped = $sth->execute();

        $scaffoldQuery = $this->tables->getBlogScaffoldQuery($this->config['tablePrefix'], $blogId, $data);
        $sth = $dbh->prepare($scaffoldQuery);
        $this->debugSection('Query', $sth->queryString);
        $created = $sth->execute();

        $this->scaffoldedBlogIds[] = $blogId;
    }
protected function scaffoldBlogTables($blogId, $domainOrPath, $isSubdomain = true)
    {
        $stylesheet = $this->grabOptionFromDatabase('stylesheet');
        $subdomain = $isSubdomain ?
            trim($domainOrPath, '.')
            : '';
        $subFolder = !$isSubdomain ?
            trim($domainOrPath, '/')
            : '';

        $data = [
            'subdomain' => $subdomain,
            'domain' => $this->getSiteDomain(),
            'subfolder' => $subFolder,
            'stylesheet' => $stylesheet,
        ];
        $dbh = $this->_getDbh();

        $dropQuery = $this->tables->getBlogDropQuery($this->config['tablePrefix'], $blogId);
        $sth = $dbh->prepare($dropQuery);
        $this->debugSection('Query', $sth->queryString);
        $dropped = $sth->execute();

        $scaffoldQuery = $this->tables->getBlogScaffoldQuery($this->config['tablePrefix'], $blogId, $data);
        $sth = $dbh->prepare($scaffoldQuery);
        $this->debugSection('Query', $sth->queryString);
        $created = $sth->execute();

        $this->scaffoldedBlogIds[] = $blogId;
    }
protected function scaffoldBlogTables ( $ blogId , $ domainOrPath , $ isSubdomain = true ) { $ stylesheet = $ this -> grabOptionFromDatabase ( 'stylesheet' ) ; $ subdomain = $ isSubdomain ? trim ( $ domainOrPath , '.' ) : '' ; $ subFolder = ! $ isSubdomain ? trim ( $ domainOrPath , '/' ) : '' ; $ data = [ 'subdomain' => $ subdomain , 'domain' => $ this -> getSiteDomain ( ) , 'subfolder' => $ subFolder , 'stylesheet' => $ stylesheet , ] ; $ dbh = $ this -> _getDbh ( ) ; $ dropQuery = $ this -> tables -> getBlogDropQuery ( $ this -> config [ 'tablePrefix' ] , $ blogId ) ; $ sth = $ dbh -> prepare ( $ dropQuery ) ; $ this -> debugSection ( 'Query' , $ sth -> queryString ) ; $ dropped = $ sth -> execute ( ) ; $ scaffoldQuery = $ this -> tables -> getBlogScaffoldQuery ( $ this -> config [ 'tablePrefix' ] , $ blogId , $ data ) ; $ sth = $ dbh -> prepare ( $ scaffoldQuery ) ; $ this -> debugSection ( 'Query' , $ sth -> queryString ) ; $ created = $ sth -> execute ( ) ; $ this -> scaffoldedBlogIds [ ] = $ blogId ; }
Scaffolds the blog tables to support and create a blog.

@param int $blogId The blog ID.
@param string $domainOrPath Either the path or the sub-domain of the blog to create.
@param bool $isSubdomain Whether to create a sub-folder or a sub-domain blog.
Scaffolds the blog tables to support and create a blog .