Locker\Helpers\Helpers::replaceHtmlEntity PHP Method

replaceHtmlEntity() static public method

|----------------------------------------------------------------------------
static public replaceHtmlEntity ( $array, $toArray = false )
    static function replaceHtmlEntity($array, $toArray = false)
    {
        return json_decode(str_replace('&46;', '.', json_encode($array)), $toArray);
    }

Usage Example

 /**
  * Aggregates the statements in the LRS (with the $lrsId) with the $pipeline.
  * @param string $lrsId
  * @param [mixed] $pipeline
  * @return [Aggregate] http://php.net/manual/en/mongocollection.aggregate.php#refsect1-mongocollection.aggregate-examples
  */
 public function aggregate($lrsId, array $pipeline)
 {
     if (strpos(json_encode($pipeline), '$out') !== false) {
         return;
     }
     $pipeline[0]['$match'] = ['$and' => [(object) $pipeline[0]['$match'], [self::LRS_ID_KEY => $lrsId, 'active' => true]]];
     return Helpers::replaceHtmlEntity($this->db->statements->aggregate($pipeline), true);
 }
All Usage Examples Of Locker\Helpers\Helpers::replaceHtmlEntity