public function enableAll(array $except = [])
    {
        // Check if excluded components name are exists or not
        foreach ($except as $name) {
            if (!array_key_exists($name, $this->components)) {
                throw new NotValidCompoenentException($name . ' component is not valid');
            }
        }

        // Enable components
        foreach ($this->components as $name => &$status) {
            $status = !in_array($name, $except, true);
        }

        return $this;
    }
public function enableAll(array $except = [])
    {
        // Check if excluded components name are exists or not
        foreach ($except as $name) {
            if (!array_key_exists($name, $this->components)) {
                throw new NotValidCompoenentException($name . ' component is not valid');
            }
        }

        // Enable components
        foreach ($this->components as $name => &$status) {
            $status = !in_array($name, $except, true);
        }

        return $this;
    }
public function enableAll ( array $ except = [ ] ) { // Check if excluded components name are exists or not foreach ( $ except as $ name ) { if ( ! array_key_exists ( $ name , $ this -> components ) ) { throw new NotValidCompoenentException ( $ name . ' component is not valid' ) ; } } // Enable components foreach ( $ this -> components as $ name => & $ status ) { $ status = ! in_array ( $ name , $ except , true ) ; } return $ this ; }
Enable all components except listed ones

@param string[] $except list of components that will be not enabled

@return $this
Enable all components except listed ones