This file contains hidden or 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 | |
// -------------- Library Autoloading Process -------------- | |
if(!empty($this->_config->system->autoloadLibs)) { | |
foreach(explode(',', $this->_config->system->autoloadLibs) as $sLib) { | |
switch(strtolower($sLib)) { | |
case 'zf': | |
PPI_Autoload::add('Zend', array( | |
'path' => SYSTEMPATH . 'Vendor/', |
This file contains hidden or 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 | |
static function getCache($p_mOptions = null) { | |
switch(true) { | |
case is_array($p_mOptions): | |
return new PPI_Cache($p_mOptions); | |
break; | |
case is_null($p_mOptions) || ($bIsString = is_string($p_mOptions)): |
This file contains hidden or 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 | |
static function getCache($p_mOptions = null) | |
{ | |
if (!is_array($p_mOptions)) { | |
$config = self::getConfig(); | |
$options = isset($config->cache) ? $config->cache->toArray() : array(); | |
if (is_string($p_mOptions)) { | |
$options['handler'] = $p_mOptions; | |
} | |
$p_mOptions = $options; |
This file contains hidden or 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 | |
static function getCache($p_mOptions = null) { | |
if (!is_array($p_mOptions)) { | |
$config = self::getConfig(); | |
$options = isset($config->cache) ? $config->cache->toArray() : array(); | |
if (is_string($p_mOptions) && $p_mOptions !== '') { | |
$options['handler'] = $p_mOptions; | |
} | |
$p_mOptions = $options; | |
} |
This file contains hidden or 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 | |
/** | |
* | |
* @version 1.0 | |
* @author Paul Dragoonis <[email protected]> | |
* @license http://opensource.org/licenses/gpl-license.php GNU Public License | |
* @copyright Digiflex Development | |
* @package Cache | |
*/ |
This file contains hidden or 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 | |
if($enquiry['Deleted'] == 0) { | |
if($enquiry['Status'] == 'Replied') { | |
$this->page->replace['notificationMessage'] = '<div class="ems-success">This enquiry has been replied to.</div>'; | |
} elseif($enquiry['Status'] == 'Escalated') { | |
$this->page->replace['notificationMessage'] = '<div class="ems-error">This enquiry has not been actioned and as a result has been escalated.</div>'; | |
} elseif($enquiry['Status'] == 'New') { | |
$this->page->replace['notificationMessage'] = '<div class="ems-warning">This enquiry has not yet been actioned.</div>'; |
This file contains hidden or 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 | |
function compare() { | |
$sLevel = $this->get(__FUNCTION__, ''); | |
$iCatID = $this->get($sLevel, 0); | |
if(empty($sLevel)) { | |
throw new PPI_Exception('Unable to locate compare function\'s category level.'); | |
} | |
if(empty($iCatID) || $iCatID < 1) { | |
throw new PPI_Exception('Unable to locate category ID'); |
This file contains hidden or 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 | |
// Do we have attachments ? | |
if($attachment !== null) { | |
// If its a singular string based attachment we convert it to conform with the generic attachment structure | |
if(!is_array($attachment)) { | |
$attachment = (array) $attachment; | |
} | |
// Attach all of our attachments |
This file contains hidden or 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 | |
/** | |
* Obtain a url segments value pair by specifying the key. | |
* eg: /key/val/key2/val2 - by specifying key, you get val, by specifying key2, you get val2. | |
* @param string $p_sIndex The specified key | |
* @param string $p_sDefaultValue The default value to return in the situation that the key or subsequent value was not found. | |
* @return mixed (Can be user defined) | |
*/ | |
function get($p_sIndex, $p_sDefaultValue = "") { | |
$tmp = array(); |
This file contains hidden or 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 | |
/** | |
* Obtain a url segments value pair by specifying the key. | |
* eg: /key/val/key2/val2 - by specifying key, you get val, by specifying key2, you get val2. | |
* @param string $p_sIndex The specified key | |
* @param string $p_sDefaultValue The default value to return in the situation that the key or subsequent value was not found. | |
* @return mixed (Can be user defined) | |
*/ | |
function get($p_sIndex, $p_sDefaultValue = "") { | |
$tmp = array(); |
OlderNewer