Ejemplo n.º 1
0
        WsdlToPhpGenerator::setOptionSendParametersAsArray(false);
        WsdlToPhpGenerator::setOptionCategory(WsdlToPhpGenerator::OPT_CAT_START_NAME);
        WsdlToPhpGenerator::setOptionSubCategory(WsdlToPhpGenerator::OPT_SUB_CAT_END_NAME);
        $w->generateClasses($name, dirname(__FILE__) . '/samples/' . $name . '/');
    }
}
/**
 * Any
 */
if (true) {
    $name = 'PayPal';
    $wsdl = 'https://www.paypalobjects.com/wsdl/PayPalSvc.wsdl';
    exec('rm -rf ' . __DIR__ . '/samples/' . $name . '/*;');
    echo "\r\nStart at " . date('H:i:s');
    $w = new WsdlToPhpGenerator($wsdl);
    WsdlToPhpGenerator::setOptionGenerateAutoloadFile(true);
    WsdlToPhpGenerator::setOptionGenerateWsdlClassFile(true);
    WsdlToPhpGenerator::setOptionGenerateTutorialFile(true);
    WsdlToPhpGenerator::setOptionCategory(WsdlToPhpGenerator::OPT_CAT_TYPE);
    WsdlToPhpGenerator::setOptionSubCategory(WsdlToPhpGenerator::OPT_SUB_CAT_END_NAME);
    WsdlToPhpGenerator::setOptionAddComments(array('date' => date('Y-m-d'), 'author' => 'Mikaël DELSOL', 'version' => 1));
    echo "\r\nStart generation at " . date('H:i:s');
    $w->generateClasses($name, dirname(__FILE__) . '/samples/' . $name . '/');
    echo "\r\nEnd generation at " . date('H:i:s');
    echo "\r\nGenerate doc start " . date('H:i:s');
    $ouputs = array();
    exec('rm -rf ' . __DIR__ . '/docs/' . $name . '/* && clear && phpdoc --sourcecode on -d ' . __DIR__ . '/samples/' . $name . ' -t ' . __DIR__ . '/docs/' . $name . ' -pp -ti "' . ucfirst($name) . ' package documentation" -o HTML:frames:DOM/earthli;', $ouputs);
    print_r($ouputs);
    echo "\r\nGenerate doc end " . date('H:i:s');
    print_r($w->getAudit());
}