Esempio n. 1
0
 /**
  * Creates a search object and optionally sets base criteria.
  *
  * @param boolean $default Add default criteria
  * @return MW_Common_Criteria_Interface Criteria object
  */
 public function createSearch($default = false)
 {
     if ($default === true) {
         return $this->_createSearch('job');
     }
     return parent::createSearch();
 }
Esempio n. 2
0
 /**
  * Creates the log manager that will use the given context object.
  *
  * @param MShop_Context_Item_Interface $context Context object with required objects
  */
 public function __construct(MShop_Context_Item_Interface $context)
 {
     parent::__construct($context);
     $this->_setResourceName('db-log');
     $config = $context->getConfig();
     /** madmin/log/manager/default/loglevel
      *
      * Manager, provider and other active components write messages about
      * problems, informational and debug output to the logs. The messages
      * that are actually written to the logs can be limited with the
      * "loglevel" configuration.
      *
      * Available log levels are:
      * * Emergency (0): system is unusable
      * * Alert (1): action must be taken immediately
      * * Critical (2): critical conditions
      * * Error (3): error conditions
      * * Warning (4): warning conditions
      * * Notice (5): normal but significant condition
      * * Informational (6): informational messages
      * * Debug (7): debug messages
      *
      * The "loglevel" configuration option defines the severity of messages
      * that will be written to the logs, e.g. a log level of "3" (error)
      * will allow all messages with an associated level of three and below
      * (error, critical, alert and emergency) to be written to the storage.
      * Messages with other log levels (warning, notice, informational and
      * debug) would be discarded and won't be written to the storage.
      *
      * The higher the log level, the more messages will be written to the
      * storage. Keep in mind that a higher volume of messages will slow
      * down the system and the debug log level shouldn't be used in
      * production environments with a high number of visitors!
      *
      * @param integer Log level number
      * @since 2014.03
      * @category Developer
      * @category User
      */
     $this->_loglevel = $config->get('madmin/log/manager/default/loglevel', MW_Logger_Abstract::WARN);
     $this->_requestid = md5(php_uname('n') . getmypid() . date('Y-m-d H:i:s'));
 }
Esempio n. 3
0
 /**
  * Creates the cache manager that will use the given context object.
  *
  * @param MShop_Context_Item_Interface $context Context object with required objects
  */
 public function __construct(MShop_Context_Item_Interface $context)
 {
     parent::__construct($context);
     $this->_setResourceName('db-cache');
 }