Example #1
0
 public function bootstrap()
 {
     // Enable project classes autoloading.
     spl_autoload_register([$this, 'loadClass']);
     // Load configuration files.
     $this->configuration->load('database');
     $this->configuration->load('library');
     // Convert all PHP errors to exceptions.
     error_reporting(E_ALL);
     set_error_handler(function ($code, $message, $filename, $lineNumber) {
         throw new ErrorException($message, $code, 1, $filename, $lineNumber);
     });
     return $this;
 }
 public function __construct($ps_widget_path, $pa_settings)
 {
     $this->title = _t('Records by status');
     $this->description = _t('Displays objects or authority items by cataloguing status');
     parent::__construct($ps_widget_path, $pa_settings);
     $this->opo_config = Configuration::load($ps_widget_path . '/conf/recordsByStatus.conf');
     $this->opo_datamodel = Datamodel::load();
     # -- get status values
     $t_lists = new ca_lists();
     $va_statuses = caExtractValuesByUserLocale($t_lists->getItemsForList("workflow_statuses"));
     $va_status_info = array();
     $va_status_values = array();
     foreach ($va_statuses as $i => $va_info) {
         $va_status_info[$va_info["item_value"]] = $va_info["name_singular"];
         $va_status_values[] = $va_info["item_value"];
     }
     $this->opa_status_display_names = $va_status_info;
     $this->opa_status_values = $va_status_values;
     $this->opa_table_display_names = array('ca_objects' => _t('Objects'), 'ca_entities' => _t('Entities'), 'ca_places' => _t('Places'), 'ca_occurrences' => _t('Occurrences'), 'ca_sets' => _t('Sets'), 'ca_collections' => _t('Collections'), 'ca_object_representations' => _t('Object representations'), 'ca_object_lots' => _t('Object lots'));
     foreach ($this->opa_table_display_names as $vs_table => $vs_display) {
         if (!$this->getRequest() || !$this->getRequest()->user->canDoAction("can_use_records_by_status_widget_{$vs_table}")) {
             foreach (BaseWidget::$s_widget_settings['recordsByStatusWidget']["display_type"]["options"] as $vs_setting_display => $vs_setting_table) {
                 if ($vs_setting_table == $vs_table) {
                     unset(BaseWidget::$s_widget_settings['recordsByStatusWidget']["display_type"]["options"][$vs_setting_display]);
                 }
             }
         }
     }
 }
 public function __construct()
 {
     $this->opo_search_base = new SearchBase();
     $this->opo_app_config = Configuration::load();
     $this->opo_search_config = Configuration::load($this->opo_app_config->get("search_config"));
     $this->opo_search_indexing_config = Configuration::load($this->opo_search_config->get("search_indexing_config"));
     $this->ops_webserver_user = posix_getpwuid(posix_getuid());
     $this->ops_webserver_user = $this->ops_webserver_user['name'];
     $this->opa_setting_descriptions = array();
     $this->opa_setting_names = array();
     $this->opa_setting_hints = array();
     $this->_initMessages();
     // allow overriding settings from search.conf via constant (usually defined in bootstrap file)
     // this is useful for multi-instance setups which have the same set of config files for multiple instances
     if (defined('__CA_SOLR_URL__') && strlen(__CA_SOLR_URL__) > 0) {
         $this->ops_search_solr_url = __CA_SOLR_URL__;
     } else {
         $this->ops_search_solr_url = $this->opo_search_config->get('search_solr_url');
     }
     if (defined('__CA_SOLR_HOME_DIR__') && strlen(__CA_SOLR_HOME_DIR__) > 0) {
         $this->ops_search_solr_home_dir = __CA_SOLR_HOME_DIR__;
     } else {
         $this->ops_search_solr_home_dir = $this->opo_search_config->get('search_solr_home_dir');
     }
     parent::__construct();
 }
Example #4
0
 public function __construct($ps_widget_path, $pa_settings)
 {
     $this->title = _t('lol Katz');
     $this->description = _t('I Can Has Cheezburger?');
     parent::__construct($ps_widget_path, $pa_settings);
     $this->opo_config = Configuration::load($ps_widget_path . '/conf/lolCatWidget.conf');
 }
 public function __construct()
 {
     $o_config = Configuration::load();
     if ($this->ops_change_log_database = $o_config->get("change_log_database")) {
         $this->ops_change_log_database .= ".";
     }
 }
Example #6
0
 public function __construct($ps_widget_path, $pa_settings)
 {
     $this->title = _t('Links');
     $this->description = _t('Displays CollectiveAccess project links');
     parent::__construct($ps_widget_path, $pa_settings);
     $this->opo_config = Configuration::load($ps_widget_path . '/conf/links.conf');
 }
Example #7
0
 function __construct()
 {
     $o_config = Configuration::load();
     # get plugin directory from configuration
     $plugin_dir = $o_config->get("file_plugins");
     # read contents of plugin directory
     if ($dir = dir($plugin_dir)) {
         while ($plugin = $dir->read()) {
             $m = array();
             # all plugins must start with a alphabetical character or underscore and
             # end with the '.php' extension
             if (preg_match("/^([A-Za-z_]+).php\$/", $plugin, $m)) {
                 $plugin_name = $m[1];
                 if ($this->DEBUG) {
                     print "LOADING {$plugin_name}\n";
                 }
                 # load the plugin
                 require_once "{$plugin_dir}/{$plugin}";
                 eval("\$p = new WLPlugFile" . $plugin_name . "();");
                 # register the plugin's capabilities
                 if ($vo_instance =& $p->register()) {
                     $this->plugins[$plugin_name] = $vo_instance;
                 }
             }
         }
         return true;
     }
     return null;
 }
 public function __construct($ps_plugin_path)
 {
     $this->description = _t('Publishes newly published records to twitter.');
     parent::__construct();
     $this->opo_config = Configuration::load($ps_plugin_path . '/conf/twitter.conf');
     require_once $ps_plugin_path . '/bitly.php';
 }
 public function __construct(&$po_request, &$po_response, $pa_view_paths = null)
 {
     $this->ops_theme = __CA_THEME__;
     // get current theme
     if (!is_dir(__CA_APP_DIR__ . '/plugins/NovaMuse/themes/' . $this->ops_theme . '/views')) {
         // if theme is not defined for this plugin, try to use "default" theme
         $this->ops_theme = 'default';
     }
     parent::__construct($po_request, $po_response, array(__CA_APP_DIR__ . '/plugins/NovaMuse/themes/' . $this->ops_theme . '/views'));
     $this->opo_plugin_config = Configuration::load($this->request->getAppConfig()->get('application_plugins') . '/NovaMuse/conf/NovaMuse.conf');
     if (!(bool) $this->opo_plugin_config->get('enabled')) {
         die(_t('NovaMuse plugin is not enabled'));
     }
     MetaTagManager::addLink('stylesheet', $po_request->getBaseUrlPath() . "/app/plugins/NovaMuse/themes/" . $this->ops_theme . "/css/dashboard.css", 'text/css');
     $this->opo_result_context = new ResultContext($po_request, 'ca_objects', 'dashboard');
     $t_list = new ca_lists();
     $this->opn_member_institution_id = $t_list->getItemIDFromList('entity_types', 'member_institution');
     $this->opn_individual_id = $t_list->getItemIDFromList('entity_types', 'ind');
     $this->opn_family_id = $t_list->getItemIDFromList('entity_types', 'fam');
     $this->opn_organization_id = $t_list->getItemIDFromList('entity_types', 'org');
     $t_object = new ca_objects();
     $this->opn_objectTableNum = $t_object->tableNum();
     $va_access_values = caGetUserAccessValues($this->request);
     $this->opa_access_values = $va_access_values;
     $this->view->setVar('access_values', $va_access_values);
 }
 public function __construct($ps_widget_path, $pa_settings)
 {
     $this->title = _t('Saved searches');
     $this->description = _t('Performed saved search queries from your dashboard');
     parent::__construct($ps_widget_path, $pa_settings);
     $this->opo_config = Configuration::load($ps_widget_path . '/conf/savedSearches.conf');
 }
Example #11
0
 public function __construct($ps_widget_path, $pa_settings)
 {
     $this->title = _t('Clock');
     $this->description = _t('Tells time in digital or faux analog formats');
     parent::__construct($ps_widget_path, $pa_settings);
     $this->opo_config = Configuration::load($ps_widget_path . '/conf/clockWidget.conf');
 }
 public function loadSettings($m_table, $ps_field_name)
 {
     if (!is_object($m_table)) {
         // if it's not a table instance, try using $m_table as a table name
         if (!($t_table = $this->opo_datamodel->getInstanceByTableName($m_table, true))) {
             return false;
         }
     } else {
         $t_table =& $m_table;
     }
     if (!($va_field_info = $t_table->getFieldInfo($ps_field_name))) {
         return false;
     }
     $this->opa_table_settings = $this->opo_config_settings = null;
     if (!isset($va_field_info['MEDIA_ACCEPT']) || !is_array($va_field_info['MEDIA_ACCEPT'])) {
         if (!($vs_config_path = $this->opo_config->get('media_processing_settings'))) {
             return false;
         }
         if (!($vs_media_processing_setting = $va_field_info['MEDIA_PROCESSING_SETTING'])) {
             return false;
         }
         $this->opo_config_settings = Configuration::load($vs_config_path);
         if (!($this->opa_config_settings_as_array = $this->opo_config_settings->getAssoc($vs_media_processing_setting))) {
             return false;
         }
     } else {
         $this->opa_table_settings =& $va_field_info;
     }
     return true;
 }
 public function __construct($ps_plugin_path)
 {
     $this->ops_plugin_path = $ps_plugin_path;
     $this->description = _t('Imports bibliographic information from WorldCat');
     parent::__construct();
     $this->opo_config = Configuration::load($ps_plugin_path . '/conf/worldcat.conf');
 }
 public function __construct($ps_plugin_path)
 {
     $this->ops_plugin_path = $ps_plugin_path;
     $this->description = _t('Allows to visualize tables and lists with optional charts (prestored SQL requests).');
     parent::__construct();
     $this->opo_config = Configuration::load($ps_plugin_path . '/conf/statisticsViewer.conf');
 }
 public function __construct($ps_widget_path, $pa_settings)
 {
     $this->title = _t('Message of the day');
     $this->description = _t('Display the message of the day.');
     parent::__construct($ps_widget_path, $pa_settings);
     $this->opo_config = Configuration::load($ps_widget_path . '/conf/messageWidget.conf');
 }
 /**
  * Options:
  * 		rawDate - if true, returns date as an array of start and end historic timestames
  *		sortable - if true a language-independent sortable representation is returned.
  *		getDirectDate - get underlying historic timestamp (floatval)
  */
 public function getDisplayValue($pa_options = null)
 {
     if (!is_array($pa_options)) {
         $pa_options = array();
     }
     if (isset($pa_options['rawDate']) && $pa_options['rawDate']) {
         return array(0 => $this->opn_start_date, 1 => $this->opn_end_date, 'start' => $this->opn_start_date, 'end' => $this->opn_end_date);
     }
     if (isset($pa_options['GET_DIRECT_DATE']) && $pa_options['GET_DIRECT_DATE'] || isset($pa_options['getDirectDate']) && $pa_options['getDirectDate']) {
         return $this->opn_start_date;
     }
     if (isset($pa_options['sortable']) && $pa_options['sortable']) {
         if (!$this->opn_start_date || !$this->opn_end_date) {
             return null;
         }
         return $this->opn_start_date . '/' . $this->opn_end_date;
     }
     $o_config = Configuration::load();
     $o_date_config = Configuration::load($o_config->get('datetime_config'));
     if ($o_date_config->get('dateFormat') == 'original') {
         return $this->ops_text_value;
     } else {
         $t_element = new ca_metadata_elements($this->getElementID());
         $va_settings = $this->getSettingValuesFromElementArray($t_element->getFieldValuesArray(), array('isLifespan'));
         $o_tep = new TimeExpressionParser();
         $o_tep->setHistoricTimestamps($this->opn_start_date, $this->opn_end_date);
         return $o_tep->getText(array_merge(array('isLifespan' => $va_settings['isLifespan']), $pa_options));
         //$this->ops_text_value;
     }
 }
Example #17
0
 public function __construct(&$po_request, &$po_response, $pa_view_paths = null)
 {
     $this->ops_theme = __CA_THEME__;
     // get current theme
     if (!is_dir(__CA_APP_DIR__ . '/plugins/MetabolicChronology/themes/' . $this->ops_theme . '/views')) {
         // if theme is not defined for this plugin, try to use "default" theme
         $this->ops_theme = 'default';
     }
     parent::__construct($po_request, $po_response, array(__CA_APP_DIR__ . '/plugins/MetabolicChronology/themes/' . $this->ops_theme . '/views'));
     $this->opo_plugin_config = Configuration::load($this->request->getAppConfig()->get('application_plugins') . '/MetabolicChronology/conf/Chronology.conf');
     if (!(bool) $this->opo_plugin_config->get('enabled')) {
         die(_t('Metabolic Chronology plugin is not enabled'));
     }
     $this->_initView($pa_options);
     $this->opo_result_context = new ResultContext($po_request, 'ca_objects', 'MetabolicChronology');
     MetaTagManager::addLink('stylesheet', $po_request->getBaseUrlPath() . "/app/plugins/MetabolicChronology/themes/" . $this->ops_theme . "/css/chronology.css", 'text/css');
     JavascriptLoadManager::register('jcarousel');
     JavascriptLoadManager::register('maps');
     $t_list = new ca_lists();
     $this->opn_silo_type_id = $t_list->getItemIDFromList('collection_types', 'silo');
     $this->opn_action_type_id = $t_list->getItemIDFromList('occurrence_types', 'action');
     $this->opn_context_type_id = $t_list->getItemIDFromList('occurrence_types', 'context');
     $this->opn_yes_list_id = $t_list->getItemIDFromList('yes_no', 'yes');
     $t_relationship_types = new ca_relationship_types();
     $this->opn_rel_type_action_display_image = $t_relationship_types->getRelationshipTypeID("ca_objects_x_occurrences", "display");
     $this->opn_rel_type_action_secondary_images = $t_relationship_types->getRelationshipTypeID("ca_objects_x_occurrences", "secondary");
     $va_access_values = caGetUserAccessValues($this->request);
     $this->opa_access_values = $va_access_values;
     $this->view->setVar('access_values', $va_access_values);
 }
 public function __construct(&$po_request, &$po_response, $pa_view_paths)
 {
     $vo_conf = Configuration::load();
     $this->opo_services_conf = Configuration::load($vo_conf->get("services_config"));
     $this->opb_disable = !$this->opo_services_conf->get("enable_access_control");
     parent::__construct($po_request, $po_response, $pa_view_paths);
 }
Example #19
0
/**
 * Get theme-specific contribute form configuration
 *
 * @return Configuration 
 */
function caGetContributeFormConfig()
{
    if (file_exists(__CA_THEME_DIR__ . '/conf/contribute.conf')) {
        return Configuration::load(__CA_THEME_DIR__ . '/conf/contribute.conf');
    }
    return Configuration::load(__CA_THEMES_DIR__ . '/default/conf/contribute.conf');
}
Example #20
0
 public function __construct()
 {
     parent::__construct();
     $this->opo_app_config = Configuration::load();
     $vs_external_app_config_path = $this->opo_app_config->get('external_applications');
     $this->opo_external_app_config = Configuration::load($vs_external_app_config_path);
 }
Example #21
0
 function TilepicParser($filename = "")
 {
     $this->opo_config = Configuration::load();
     $vs_external_app_config_path = $this->opo_config->get('external_applications');
     $this->opo_external_app_config = Configuration::load($vs_external_app_config_path);
     $this->ops_imagemagick_path = $this->opo_external_app_config->get('imagemagick_path');
     $this->ops_CoreImage_path = $this->opo_external_app_config->get('coreimagetool_app');
     $this->opa_CoreImage_pipeline = array();
     $this->ops_graphicsmagick_path = $this->opo_external_app_config->get('graphicsmagick_app');
     // edit ranking of preferred backends for tilepic processing here
     // TODO: maybe put this in a config file and make it consistent with
     // what the main media processing engine "choses"?
     $va_backend_ranking = array(LIBRARY_GMAGICK => caMediaPluginGmagickInstalled(), LIBRARY_COREIMAGE => caMediaPluginCoreImageInstalled($this->ops_CoreImage_path), LIBRARY_IMAGICK => caMediaPluginImagickInstalled(), LIBRARY_GRAPHICSMAGICK => caMediaPluginGraphicsMagickInstalled($this->ops_graphicsmagick_path), LIBRARY_IMAGEMAGICK => caMediaPluginImageMagickInstalled($this->ops_imagemagick_path), LIBRARY_GD => true);
     foreach ($va_backend_ranking as $vn_backend => $vb_available) {
         if ($vb_available) {
             $this->backend = $vn_backend;
             break;
         }
     }
     if ($this->debug) {
         print "TilePic processing backend is {$this->backend}";
     }
     if ($filename) {
         $this->load($filename);
     }
 }
Example #22
0
 public function Get()
 {
     global $g_ui_locale_id;
     $ps_query = $this->request->getParameter('q', pString);
     $ps_type = $this->request->getParameter('type', pString);
     $vo_conf = Configuration::load();
     $vs_user = trim($vo_conf->get("geonames_user"));
     $va_items = array();
     if (unicode_strlen($ps_query) >= 3) {
         $vs_base = "http://api.geonames.org/search";
         $t_locale = new ca_locales($g_ui_locale_id);
         $vs_lang = $t_locale->get("language");
         $va_params = array("q" => $ps_query, "lang" => $vs_lang, 'style' => 'full', 'username' => $vs_user);
         foreach ($va_params as $vs_key => $vs_value) {
             $vs_query_string .= "{$vs_key}=" . urlencode($vs_value) . "&";
         }
         try {
             $vo_xml = new SimpleXMLElement(@file_get_contents("{$vs_base}?{$vs_query_string}"));
             //var_dump($vo_result);
             foreach ($vo_xml->children() as $vo_child) {
                 if ($vo_child->getName() != "totalResultsCount") {
                     $va_items[$vo_child->geonameId . ""] = array('displayname' => $vo_child->name, 'country' => $vo_child->countryName ? $vo_child->countryName : null, 'continent' => $vo_child->continentCode ? $vo_child->continentCode : null, 'fcl' => $vo_child->fclName ? $vo_child->fclName : null, 'lat' => $vo_child->lat ? $vo_child->lat : null, 'lng' => $vo_child->lng ? $vo_child->lng : null, 'idno' => $vo_child->geonameId);
                 }
             }
         } catch (Exception $e) {
             $va_items[0] = array('displayname' => _t('Could not connect to GeoNames'), 'country' => '', 'continent' => '', 'fcl' => '', 'lat' => '', 'lng' => '', 'idno' => '');
         }
     }
     $this->view->setVar('geonames_list', $va_items);
     return $this->render('ajax_geonames_list_html.php');
 }
Example #23
0
 public function __construct($ps_plugin_path)
 {
     $this->ops_plugin_path = $ps_plugin_path;
     $this->description = _t('Imports artist records from ULAN');
     parent::__construct();
     $this->opo_config = Configuration::load($ps_plugin_path . '/conf/ulan.conf');
 }
 public function __construct($ps_widget_path, $pa_settings)
 {
     $this->title = _t('Your Watched Items');
     $this->description = _t('Get a list of your watched items.');
     parent::__construct($ps_widget_path, $pa_settings);
     $this->opo_config = Configuration::load($ps_widget_path . '/conf/watchedItemsWidget.conf');
 }
 public function __construct($ps_plugin_path)
 {
     $this->description = _t('Handles periodic cleanup and email alert tasks for library services features.');
     parent::__construct();
     $this->opo_config = Configuration::load();
     $this->opo_library_services_config = caGetlibraryServicesConfiguration();
 }
 public function __construct($ps_widget_path, $pa_settings)
 {
     $this->title = _t('Search By Set');
     $this->description = _t('Search for items in your sets.');
     parent::__construct($ps_widget_path, $pa_settings);
     $this->opo_config = Configuration::load($ps_widget_path . '/conf/searchBySet.conf');
 }
Example #27
0
 public function register()
 {
     $this->opo_config = Configuration::load();
     $vs_external_app_config_path = $this->opo_config->get('external_applications');
     $this->opo_external_app_config = Configuration::load($vs_external_app_config_path);
     $this->ops_imagemagick_path = $this->opo_external_app_config->get('imagemagick_path');
     $this->ops_graphicsmagick_path = $this->opo_external_app_config->get('graphicsmagick_app');
     $this->ops_CoreImage_path = $this->opo_external_app_config->get('coreimagetool_app');
     if (caMediaPluginCoreImageInstalled($this->ops_CoreImage_path)) {
         return null;
         // don't use if CoreImage executable are available
     }
     if (caMediaPluginImagickInstalled()) {
         return null;
         // don't use GD if Imagick is available
     }
     if (caMediaPluginGmagickInstalled()) {
         return null;
         // don't use GD if Gmagick is available
     }
     if (caMediaPluginImageMagickInstalled($this->ops_imagemagick_path)) {
         return null;
         // don't use if ImageMagick executables are available
     }
     if (caMediaPluginGraphicsMagickInstalled($this->ops_graphicsmagick_path)) {
         return null;
         // don't use if GraphicsMagick is available
     }
     if (!caMediaPluginGDInstalled()) {
         return null;
         // don't use if GD functions are not available
     }
     $this->info["INSTANCE"] = $this;
     return $this->info;
 }
 public function __construct($ps_widget_path, $pa_settings)
 {
     $this->title = _t('Random Object');
     $this->description = _t('Displays a random object from the collection');
     parent::__construct($ps_widget_path, $pa_settings);
     $this->opo_config = Configuration::load($ps_widget_path . '/conf/randomObjectWidget.conf');
 }
Example #29
0
 public function __construct(&$po_request, &$po_response, $pa_view_paths = null)
 {
     $this->ops_theme = __CA_THEME__;
     // get current theme
     if (!is_dir(__CA_APP_DIR__ . '/plugins/eastend/themes/' . $this->ops_theme . '/views')) {
         // if theme is not defined for this plugin, try to use "default" theme
         $this->ops_theme = 'default';
     }
     parent::__construct($po_request, $po_response, array(__CA_APP_DIR__ . '/plugins/eastend/themes/' . $this->ops_theme . '/views'));
     MetaTagManager::addLink('stylesheet', $po_request->getBaseUrlPath() . "/app/plugins/eastend/themes/" . $this->ops_theme . "/css/eastend.css", 'text/css');
     $this->opo_plugin_config = Configuration::load($this->request->getAppConfig()->get('application_plugins') . '/eastend/conf/eastend.conf');
     if (!(bool) $this->opo_plugin_config->get('enabled')) {
         die(_t('eastend plugin is not enabled'));
     }
     // redirect user if not logged in
     if ($this->request->config->get('pawtucket_requires_login') && !$this->request->isLoggedIn()) {
         $this->response->setRedirect(caNavUrl($this->request, "", "LoginReg", "form"));
     }
     $po_request->session->setVar('pawtucket2_browse_target', "ca_objects");
     if ($this->request->config->get("dont_enforce_access_settings")) {
         $this->opa_access_values = array();
     } else {
         $this->opa_access_values = caGetUserAccessValues($this->request);
     }
     $this->view->setVar('access_values', $va_access_values);
     $this->opo_result_context = new ResultContext($po_request, $this->ops_tablename, $this->ops_find_type);
     $this->opo_result_context->setAsLastFind();
     $this->opo_browse = new ObjectBrowse($x = $this->opo_result_context->getSearchExpression());
     $this->view->setvar("browse_place_ids", $this->opo_plugin_config->get('artist_browser_place_ids'));
 }
Example #30
0
 /**
  * Write all packages specified in $configFile to $outputDir.
  * The default $configFile is "$STUDIP_BASE_PATH/config/assets.yml"
  *
  * @param string $configFile  path to the config file
  * @param string $outputDir   path to the output directory
  */
 function packageAll($configFile = NULL, $outputDir = NULL)
 {
     global $STUDIP_BASE_PATH;
     $configFile = $configFile ?: "{$STUDIP_BASE_PATH}/config/assets.yml";
     $configuration = Configuration::load($configFile, $forced = TRUE);
     $packager = new Packager($configuration);
     $packager->cacheAll($outputDir);
     $compressor = new Compressor($configuration);
     if (is_array($configuration['css'])) {
         $compress = $compressor->shouldCompress();
         if ($compress && !$compressor->hasJava()) {
             $compress = false;
             error_log('CSS could not be compressed, since Java is missing.');
         }
         $config_time = filemtime($configFile);
         foreach ($configuration['css'] as $package => $files) {
             foreach (array_keys($files) as $file) {
                 $src = $configuration['assets_root'] . '/stylesheets/' . $file;
                 $dest = $configuration['package_path'] . '/' . $package . '-' . $file;
                 if (!file_exists($dest) || max($config_time, filemtime($src)) > filemtime($dest)) {
                     $contents = file_get_contents($src);
                     if ($compress) {
                         $contents = $compressor->callCompressor($contents, 'css');
                     }
                     file_put_contents($dest, $contents);
                 }
             }
         }
     }
 }