| <?php
|
|
|
|
|
| include_once "templates/index_template.inc";
|
| class Entries
|
| {
|
| private $quantity;
|
| private $tagWeights = array();
|
| private function LoadTagWeights($weights)
|
| {
|
| foreach($weights as $w => $idx)
|
| {
|
| print_r($idx);
|
| }
|
| }
|
|
|
| function __construct($data)
|
| {
|
| $this->LoadTagWeights($data["TagWeights"]);
|
| }
|
| }
|
|
|
| function getDatabaseJson()
|
| {
|
|
|
| $jason = file_get_contents('../data/entriesList.json');
|
| echo $jason;
|
| $jasonData = json_decode($jason,true);
|
| $entriesObj = new Entries($jasonData["Entries"]);
|
|
|
|
|
| }
|
|
|
| getDatabaseJson();
|
| {
|
| "Application":{},
|
| "Entries":{
|
| "Quantity":0,
|
| "EntriesList":[],
|
| "TagWeights":[
|
| ["PHP",1],
|
| ["Programming",12]
|
| ]
|
| }
|
| }
|