CCM::removeAllClusters PHP Method

removeAllClusters() public method

public removeAllClusters ( $is_all = false )
    public function removeAllClusters($is_all = false)
    {
        $clusters = $this->getClusters();
        foreach ($clusters['list'] as $cluster) {
            // Determine if the cluster should be deleted
            if (!$is_all && substr(strtolower($cluster), 0, strlen($this->clusterPrefix)) != $this->clusterPrefix) {
                continue;
            }
            $this->removeCluster($cluster);
        }
    }

Usage Example

コード例 #1
0
ファイル: FeatureContext.php プロジェクト: NSRagu/php-driver
 /**
  * Cleans test folders in the temporary directory.
  *
  * @BeforeSuite
  * @AfterSuite
  */
 public static function cleanTestFolders()
 {
     if (is_dir($dir = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'php-driver')) {
         self::clearDirectory($dir);
     }
     $ccm = new \CCM('', '');
     $ccm->removeAllClusters();
 }
All Usage Examples Of CCM::removeAllClusters