Skip to content
This repository has been archived by the owner on Feb 4, 2022. It is now read-only.

Commit

Permalink
Make encoder and decoder private class properties
Browse files Browse the repository at this point in the history
  • Loading branch information
johanjanssens committed Apr 28, 2016
1 parent f548db9 commit 652c9c1
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions code/object/config/yaml.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ class ObjectConfigYaml extends ObjectConfigFormat
*
* @var callable
*/
protected static $_encoder;
protected static $__encoder;

/**
* YAML decoder callback
*
* @var callable
*/
protected static $_decoder;
protected static $__decoder;

/**
* Constructor.
Expand All @@ -40,7 +40,7 @@ public function __construct( $options = array() )
{
parent::__construct($options);

if(!self::$_encoder)
if(!self::$__encoder)
{
if (function_exists('yaml_emit')) {
$this->setEncoder('yaml_emit');
Expand All @@ -49,7 +49,7 @@ public function __construct( $options = array() )
}
}

if(!self::$_decoder)
if(!self::$__decoder)
{
if (function_exists('yaml_parse')) {
$this->setDecoder('yaml_parse');
Expand All @@ -66,7 +66,7 @@ public function __construct( $options = array() )
*/
public static function getEncoder()
{
return self::$_encoder;
return self::$__encoder;
}

/**
Expand All @@ -82,7 +82,7 @@ public static function setEncoder($encoder)
throw new \InvalidArgumentException('Invalid parameter to setEncoder(). Must be callable');
}

self::$_encoder = $encoder;
self::$__encoder = $encoder;
}

/**
Expand All @@ -92,7 +92,7 @@ public static function setEncoder($encoder)
*/
public static function getDecoder()
{
return self::$_decoder;
return self::$__decoder;
}

/**
Expand All @@ -108,7 +108,7 @@ public static function setDecoder($decoder)
throw new \InvalidArgumentException('Invalid parameter to setDecoder(). Must be callable');
}

self::$_decoder = $decoder;
self::$__decoder = $decoder;
}

/**
Expand Down

0 comments on commit 652c9c1

Please sign in to comment.