This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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')) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Discuss | |
* | |
* Copyright 2010-11 by Shaun McCormick <[email protected]> | |
* | |
* This file is part of Discuss, a native forum for MODx Revolution. | |
* | |
* Discuss is free software; you can redistribute it and/or modify it under the | |
* terms of the GNU General Public License as published by the Free Software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function addExtensionPackage($name,$path,array $options = array()) { | |
// What is it for? | |
// $extPackages | |
// It`s not using | |
$extPackages = $this->getOption('extension_packages'); | |
$extPackages = !empty($extPackages) ? $extPackages : array(); | |
$extPackages = is_array($extPackages) ? $extPackages : $this->fromJSON($extPackages); | |
$extPackages[$name] = $options; | |
$extPackages['path'] = $path; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class SocietyUser extends modUser { | |
static function load(xPDO &$xpdo, $className, $criteria, $cacheFlag = true) { | |
$instance= null; | |
$fromCache= false; | |
if ($className= $xpdo->loadClass($className)) { | |
if (!is_object($criteria)) { | |
$criteria= $xpdo->getCriteria($className, $criteria, $cacheFlag); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$path = $this->getOption('modsociety.core_path', null); | |
if(!$path){ | |
$path = MODX_CORE_PATH .'components/modsociety/'; | |
} | |
$path .= 'model/modSociety/'; | |
if(!$this->loadClass('modSociety', $path, false, true)){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
MODx{ | |
function runProcessor($action = '',$scriptProperties = array(),$options = array()){ | |
if($class = $this->loadProcessorClass($action, $options){ | |
$processor = new $class($scriptProperties,$options); | |
return $processor->process(); | |
} | |
return ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$path = $this->getOption('modsociety.core_path', null); | |
if(!$path){ | |
$path = MODX_CORE_PATH .'components/modsociety/'; | |
} | |
$path .= 'model/modSociety/'; | |
if(!$this->loadClass('modSociety', $path, false, true)){ |
OlderNewer