Skip to content

Instantly share code, notes, and snippets.

View Fi1osof's full-sized avatar

Nikolay Lanets Fi1osof

View GitHub Profile
@Fi1osof
Fi1osof / gist:4449531
Created January 4, 2013 02:57
DIFF in modCacheManager::generateContext()
<?php
public function generateContext($key, array $options = array()) {
$results = array();
$contextConfig= array_merge($this->modx->_systemConfig, $options);
/** @var modContext $obj */
$obj= $this->modx->getObject('modContext', $key, true);
if (is_object($obj) && $obj instanceof modContext && $obj->get('key')) {
$cacheKey = $obj->getCacheKey();
@Fi1osof
Fi1osof / gist:4448846
Created January 4, 2013 00:31
Modified modCacheManager::generateContext()
<?php
public function generateContext($key, array $options = array()) {
$results = array();
$contextConfig= array_merge($this->modx->_systemConfig, $options);
/** @var modContext $obj */
$obj= $this->modx->getObject('modContext', $key, true);
if (is_object($obj) && $obj instanceof modContext && $obj->get('key')) {
@Fi1osof
Fi1osof / gist:4448579
Last active December 10, 2015 14:38
Original modCacheManager::generateContext()
<?php
public function generateContext($key, array $options = array()) {
$results = array();
if (!$this->getOption('transient_context', $options, false)) {
/** @var modContext $obj */
$obj= $this->modx->getObject('modContext', $key, true);
if (is_object($obj) && $obj instanceof modContext && $obj->get('key')) {
$cacheKey = $obj->getCacheKey();
$contextKey = is_object($this->modx->context) ? $this->modx->context->get('key') : $key;
@Fi1osof
Fi1osof / modcli.php
Created December 29, 2012 21:52 — forked from Mark-H/a readme.md
<?php
/**
* modCLI is a command line interface for MODX Revolution Processors.
*
* It enables you to run any core or third party processor from the command line, passing it options as you go along.
*
* @author Mark Hamstra <[email protected]>
* @version 0.1.0-pl, 2012-12-16
* @license GPL v2
*/