function XML2JSON($xml)
{
    $result = array("ack" => (string) $xml->ack, "resultCount" => (string) $xml->paginationOutput->totalEntries, "pageNumber" => (string) $xml->paginationOutput->pageNumber, "itemCount" => (string) $xml->paginationOutput->entriesPerPage);
    $itemNum = (int) $xml->searchResult[0]['count'];
    for ($i = 0; $i < $itemNum; $i++) {
        $basicInfo = basic($xml, $i);
        $sellerInfo = seller($xml, $i);
        $shippingInfo = shipping($xml, $i);
        $info = array("basicInfo" => $basicInfo, "sellerInfo" => $sellerInfo, "shippingInfo" => $shippingInfo);
        $item = array("item" . $i => $info);
        $result = array_merge($result, $item);
    }
    echo json_encode($result);
}
                R::store($value);
            }
            return $this;
        }
    }
    $a = (new scheduleCreator())->store();
}
function clean()
{
    R::nuke();
}
/**
 * make control availible to robo
 */
switch (strtolower(end($argv))) {
    case 'basicsetup':
    case 'basic':
        basic();
        break;
    case 'clean':
    case 'nuke':
        clean();
        break;
    case 'sch':
    case 'schnew':
    case 'sn':
        scheduleNew();
    default:
        # code...
        break;
}
Example #3
0
 /**
  * Accueil de la gestion des groupes
  *
  * @return mixed
  */
 public function getGroups()
 {
     //RULER
     \ruler()->check($this->permission);
     return basic('Utilisateurs : Groupes', static::groups());
 }
 /**
  * List all references
  *
  * @return \Illuminate\View\View
  */
 public function getIndex()
 {
     \ruler()->check($this->permission);
     return basic('Références', static::reference());
 }
Example #5
0
    die("*");
}
// prevent direct access to this file
# ==================================================================
include "config.php";
include "utils.php";
# ==================================================================
$core = import("core");
$installed = import("com");
$commands = array_merge($core, $installed);
// for now, commands are very simple... only first (and sometimes second) chunk of input is processed
$inputparts = explode(" ", $rawinput);
$firstpart = $inputparts[0];
if (is_numeric($firstpart)) {
    // handling things like '10 print "hello"'
    echo basic($rawinput);
    exit;
}
# ==================================================================
$match = match($firstpart, $commands);
if ($match[0] == 0) {
    # exact match for a command
    echo process($rawinput, $commands);
} else {
    if (strstr($match[1], "_") == false) {
        echo "{$firstpart}: command not found. Did you mean '{$match['1']}'?";
    } else {
        echo "Sorry, you can't directly access the <strong>{$firstpart}</strong> command.";
    }
}
# ==================================================================