/**
  * Used only when the component is a domain override.
  *
  * @param unknown_type $domainid            
  * @param unknown_type $params            
  * @return bool
  */
 public function doEnableDomainAction($domainid, $params)
 {
     if (!strlen($params['name'])) {
         return false;
     }
     if (!isset($params['override']) and $params['override'] = self::OVERRIDE_DOMAIN) {
         return true;
     }
     $domain_query = $this->rootda->execute('SELECT domainid FROM domains WHERE id=' . $domainid);
     if ($domain_query == false or $domain_query->getNumberRows() == 0) {
         return false;
     }
     $domain_id = $domain_query->getFields('domainid');
     // Checks if the classes override directory exists
     if (!is_dir(InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getHome() . 'core/domains/' . $domain_id . '/overrides/classes/')) {
         DirectoryUtils::mktree(InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getHome() . 'core/domains/' . $domain_id . '/overrides/classes/', 0755);
         clearstatcache();
     }
     if (!file_exists(InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getHome() . 'core/domains/' . $domain_id . '/overrides/classes/' . dirname($params['name']))) {
         DirectoryUtils::mktree(InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getHome() . 'core/domains/' . $domain_id . '/overrides/classes/' . dirname($params['name']) . '/', 0755);
     }
     return copy(InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getHome() . 'core/applications/' . $this->appname . '/overrides/classes/' . $params['name'], InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getHome() . 'core/domains/' . $domain_id . '/overrides/classes/' . $params['name']);
 }
 public function mkdir($dirname)
 {
     $dirname = $this->getBaseFolder() . $dirname . '/';
     require_once 'innomatic/io/filesystem/DirectoryUtils.php';
     DirectoryUtils::mktree($dirname, 0755);
 }