示例#1
0
<?php

if (!defined('BASEPATH')) {
    exit('No direct script access allowed');
}
$plugin_info = array('pi_name' => 'JSON', 'pi_version' => '1.0.2', 'pi_author' => 'Rob Sanchez', 'pi_author_url' => 'http://barrettnewton.com/', 'pi_description' => 'Output ExpressionEngine data in JSON format.', 'pi_usage' => Json::usage());
class Json
{
    public $return_data = '';
    public $entries;
    public $entries_entry_ids;
    public $entries_custom_fields;
    protected $entries_matrix_rows;
    protected $entries_matrix_cols;
    protected $entries_relationship_data;
    public function Json()
    {
        $this->EE = get_instance();
    }
    protected function entries_initialize()
    {
        $this->entries = array();
        $this->entries_entry_ids = array();
        $this->entries_custom_fields = array();
        $this->entries_matrix_rows = NULL;
        $this->entries_relationship_data = NULL;
        //$this->entries_matrix_cols = NULL;
    }
    public function entries()
    {
        $this->entries_initialize();