Example #1
0
 /**
  * Servicio que busca el path para un dominio dado
  * @param $string
  * @param string $file_path
  *
  * @return string
  */
 public static function findDomainPath($string, $file_path)
 {
     $domains = Template::getDomains(TRUE);
     $filename_path = null;
     if (!file_exists($file_path) && 0 < count($domains)) {
         foreach ($domains as $domain => $paths) {
             $domain_filename = str_replace($domain, $paths["public"], $string);
             if (file_exists($domain_filename)) {
                 $filename_path = $domain_filename;
                 continue;
             }
         }
     }
     return $filename_path;
 }
Example #2
0
 /**
  * FunciĆ³n que copia un recurso directamente en el DocumentRoot
  * @param string $path
  * @param string $dest
  * @param bool|FALSE $force
  *
  * @return string
  * @throws ConfigException
  */
 public static function resource($path, $dest, $force = false)
 {
     $debug = Config::getInstance()->getDebugMode();
     $domains = Template::getDomains(true);
     $filename_path = self::extractPathname($path, $domains);
     GeneratorService::copyResources($dest, $force, $filename_path, $debug);
     return '';
 }