VOOZH about

URL: https://deepwiki.com/MahoCommerce/maho/5-core-services

⇱ Core Services | MahoCommerce/maho | DeepWiki


Loading...
Last indexed: 15 May 2026 (ea8ab8)
Menu

Core Services

Core Services are fundamental infrastructure components that provide essential functionality across the Maho e-commerce platform. These services operate independently of business logic and are utilized by all layers of the application—from frontend controllers to backend admin processes. This document provides an overview of the core service architecture and how these services integrate with the platform.

For detailed information about specific services, refer to the following child pages:


Core Services Architecture

The following diagram illustrates how core services integrate with the Maho application architecture, bridging high-level concepts to specific code entities.

Core Services Integration Architecture


Sources: app/code/core/Mage/Core/Model/App.php114-132 app/code/core/Mage/Cron/Helper/Data.php15-16 lib/Maho.php19-20 app/code/core/Mage/Core/etc/config.xml40-42


Service Access Patterns

Maho provides multiple patterns for accessing core services, primarily through the Mage static class and helper factories.

Static Facade and Helper Pattern

The Mage class acts as the primary entry point, while specialized helpers provide access to sub-services.

  • Encryption: Accessed via Mage::helper('core')->getEncryptor() which instantiates the model defined in global/helpers/core/encryption_model (typically Mage_Core_Model_Encryption). app/code/core/Mage/Core/etc/config.xml97-98
  • Cron Management: The Mage_Cron_Helper_Data provides methods to resolve cron expressions and check execution history. app/code/core/Mage/Cron/Helper/Data.php19-69
  • Attributes & Compilation: The Maho utility class provides access to compiled PHP attributes like observers and cron jobs, optimizing discovery without scanning XML. lib/Maho.php49-58

Service Observers and Jobs

Many core services react to system-wide events or run on schedules:

Sources: app/code/core/Mage/Cron/Helper/Data.php19-69 lib/Maho.php49-58 app/code/core/Mage/Cron/Model/Observer.php35-71 app/code/core/Mage/Page/Block/Html/Head.php110-121


Core Helper Utilities

Common utilities are provided through specialized helper classes for infrastructure operations and localization.

MethodPurposeCode Reference
getHumanReadableCronExpr()Converts cron expressions into natural languageapp/code/core/Mage/Cron/Helper/Data.php83-131
getNextRunTime()Calculates the next execution timestamp for a cron expressionapp/code/core/Mage/Cron/Helper/Data.php156-179
recompilePhpAttributes()Recompiles observers, cron jobs, and routes at runtimelib/Maho.php69-102
addItem()Adds CSS/JS items to the page head with minification flagsapp/code/core/Mage/Page/Block/Html/Head.php93-131

Sources: app/code/core/Mage/Cron/Helper/Data.php83-179 lib/Maho.php69-102 app/code/core/Mage/Page/Block/Html/Head.php93-131


External Service Dependencies

Maho modernizes infrastructure by integrating standard PHP libraries via Composer, replacing legacy custom implementations with modern alternatives.

Modern Service Mapping


Sources: composer.json52-62 app/code/core/Mage/Core/etc/config.xml97-98 app/code/core/Mage/Core/Model/App.php259-260


Administrative Service Management

Core services are managed through the Admin Interface and CLI tools.

Sources: app/code/core/Mage/Core/etc/config.xml114-147 app/code/core/Mage/Core/etc/system.xml31-58 app/code/core/Mage/Cron/Model/Observer.php19-71 app/locale/en_US/Mage_Core.csv1-110