本文整理汇总了PHP中Builder::build方法的典型用法代码示例。如果您正苦于以下问题:PHP Builder::build方法的具体用法?PHP Builder::build怎么用?PHP Builder::build使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Builder
的用法示例。
在下文中一共展示了Builder::build方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getChartWithNumberOfValuesDifferents
/**
* @test
*/
public function getChartWithNumberOfValuesDifferents()
{
$mapsWithGroupedValues = $this->goupedListWithDifferentYears();
$years = array(1989, 1992);
$xml = str_replace('<?xml version="1.0"?>', '', $this->chartBuilder->build($mapsWithGroupedValues, $years));
$this->assertEquals($this->xml2(), trim($xml));
}
示例2: build
public function build()
{
if ($this->builder !== null) {
$this->builder->build($this->days);
} else {
return false;
}
}
示例3: calcola_prenotazione_online
function calcola_prenotazione_online($user)
{
$builder = new Builder();
$dispatcher = $builder->build('calcola-online', null, $user, $_REQUEST['rc_sito_parking']);
$dispatcher->executeAjax($_REQUEST);
$ar_errori = $dispatcher->get_errori();
if (!empty($ar_errori)) {
$ar_response['errori'] = $ar_errori;
$ar_response['totale_giorni'] = 0;
$ar_response['totale_costo'] = 0;
return json_encode($ar_response);
}
$ar_so_selected = null;
if ($_REQUEST['so']) {
$ar_so_selected = json_decode($_REQUEST['so']);
}
$ar_data = array('sito_parking' => $_REQUEST['rc_sito_parking'], 'dt_p_iniziale' => $_REQUEST['rc_dt_checkin_checkout_in'], 'ora_p_iniziale' => $_REQUEST['rc_tm_checkin_checkout_in'], 'dt_p_finale' => $_REQUEST['rc_dt_checkin_checkout_out'], 'ora_p_finale' => $_REQUEST['rc_tm_checkin_checkout_out'], 'tipo_parcheggio' => $_REQUEST['rc_tipo_parcheggio'], 'tipo_cliente' => null, 'tipo_automezzo' => $_REQUEST['rc_tp_veicolo_cliente'], 'valore_sct_mag' => null, 'tipo_sct_mag' => null, 'p_online' => true, 'tp_sct_mag_v_p' => null, 'so' => $ar_so_selected, 'sop' => null);
$calcoli = new CalcolaCostiStrategy();
$calcoli->set_data($ar_data);
$calcoli->calcola();
$ar_response['totale_giorni'] = $calcoli->get_totale_giorni();
$valore_sconto = floatval($calcoli->get_valore_sct_p_online());
$ar_response['totale_costo'] = $calcoli->get_totale_costo() + $valore_sconto;
if ($valore_sconto != 0) {
$ar_response['totale_scontato'] = $ar_response['totale_costo'] - $valore_sconto;
$ar_response['totale_risparmio'] = $ar_response['totale_costo'] - $ar_response['totale_scontato'];
}
return json_encode($ar_response);
}
示例4: buildFixtures
/**
* builds a collection of fixtures
*
* @param array $rawData
* @return array
*/
protected function buildFixtures(array $rawData)
{
$fixtures = [];
foreach ($rawData as $class => $specs) {
$this->log('Loading ' . $class);
foreach ($specs as $name => $spec) {
$fixtures[] = $this->builder->build($class, $name, null !== $spec ? $spec : []);
}
}
return $fixtures ? call_user_func_array('array_merge', $fixtures) : [];
}
示例5: buildFixtures
/**
* builds a collection of fixtures
*
* @param array $rawData
* @return Collection
*/
protected function buildFixtures(array $rawData)
{
$fixtures = array();
foreach ($rawData as $class => $specs) {
$this->log('Loading ' . $class);
foreach ($specs as $name => $spec) {
$fixtures = array_merge($fixtures, $this->builder->build($class, $name, $spec));
}
}
return $fixtures;
}
示例6: run
/**
* Get all Revision-Details
*
* @param boolean $bCreateDiff [true]
*
* @return Aggregator
*/
public function run($bCreateDiff = true)
{
foreach ($this->_aArguments['revisions'] as $sRevision) {
$this->_aRevisions[] = $this->_oBuilder->build($this->_aArguments['config']->remote, $sRevision);
}
$aActions = array('read');
if ($bCreateDiff === true) {
$aActions[] = 'diff';
}
$oParallel = \parallely\Builder::build($this->_aRevisions, $this->_aArguments['config']->parallel);
$this->_aRevisions = $oParallel->run($aActions)->get();
unset($oParallel);
return $this;
}
示例7: runBuilder
function runBuilder($params)
{
$builder = new Builder($params);
if ($builder->build()) {
$contents = array();
$contents[] = '';
$contents[] = '// add to AppDelegate.cpp';
$contents[] = sprintf('#include "%s"', $builder->getOutputFilename() . '.h');
$contents[] = '';
$contents[] = '// add to AppDelegate::applicationDidFinishLaunching()';
$contents[] = 'CCLuaStack* stack = CCScriptEngineManager::sharedManager()->getScriptEngine()->getLuaStack();';
$contents[] = 'lua_State* L = stack->getLuaState();';
$contents[] = sprintf('%s(L);', $builder->getLuaopenFunctionName());
$contents[] = '';
print implode("\n", $contents);
}
}
示例8: Builder
#ifdef __cplusplus
void* tolua_obj = Mtolua_new((LUA_STRING)(tolua_ret));
tolua_pushusertype(tolua_S,tolua_obj,"LUA_STRING");
tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(LUA_STRING));
tolua_pushusertype(tolua_S,tolua_obj,"LUA_STRING");
tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
}
EOT;
$replace = '';
$FIX[$find] = $replace;
$find = 'LUA_STRING tolua_ret = (LUA_STRING)';
$replace = '';
$FIX[$find] = $replace;
$find = <<<EOT
static int tolua_collect_LUA_STRING (lua_State* tolua_S)
{
LUA_STRING* self = (LUA_STRING*) tolua_tousertype(tolua_S,1,0);
Mtolua_delete(self);
return 0;
}
EOT;
$replace = '';
$FIX[$find] = $replace;
// main
printf("\nOUT_DIR: %s\n", OUT_DIR);
$builder = new Builder('Cocos2d', 'LuaCocos2d', $FIX);
$builder->build();
示例9: Builder
* @author Sébastien Mischler (skarab) <sebastien@onlfait.ch>
* @link https://github.com/lautr3k/Straw
*/
namespace Straw;
// Define root path (force unix style)
define('ROOT_PATH', str_replace('\\', '/', __DIR__));
// Define classes path
define('CLASSES_PATH', ROOT_PATH . '/classes');
// Auto loading classes
spl_autoload_register(function ($class_name) {
require CLASSES_PATH . '/' . str_replace('\\', '/', $class_name) . '.php';
});
try {
// Create the project builder instance
$builder = new Builder('../src', '../dist');
// Build and display the output
$builder->build()->display();
} catch (\Exception $e) {
$message = $e->getMessage();
$file = $e->getFile();
$line = $e->getLine();
$output = "<html lang=\"en\"><head><meta charset=\"utf-8\">";
$output .= "<title>Error !</title></head><body>";
$output .= "<h1>Error !</h1><hr /><pre>";
$output .= "<b>Message :</b> {$message}\n";
$output .= "<b>File :</b> {$file}\n";
$output .= "<b>Line :</b> {$line}\n";
$output .= "</pre></body></html>";
echo $output;
}
示例10: Builder
<?php
define("RC_PARKAUTO", 'rc_parkauto');
include_once RC_PARKAUTO . '/class/costi_strategy.php';
include_once RC_PARKAUTO . '/class/init_action.php';
include_once RC_PARKAUTO . '/class/parkauto_builder.php';
include_once RC_PARKAUTO . '/class/parkauto_registrazione.php';
include_once RC_PARKAUTO . '/class/generic_funcs.php';
include_once RC_PARKAUTO . '/class/dispatcher.php';
$sito = null;
if (isset($_REQUEST['rc_sito_parking'])) {
$sito = $_REQUEST['rc_sito_parking'];
}
$action = null;
if (isset($_REQUEST['rc_action'])) {
$action = $_REQUEST['rc_action'];
}
global $user;
$builder = new Builder();
$dispatcher = $builder->build($action, $nid = 0, $user, $sito);
$dispatcher->execute($_REQUEST);
示例11: dirname
<?php
/**
* This scripts builds the application
*/
include dirname(__FILE__) . '/inc.php/sourceXmlParser.php';
include dirname(__FILE__) . '/inc.php/config.php';
include dirname(__FILE__) . '/inc.php/builder.php';
$config = new Configuration();
if (!$config->checkLibraries()) {
print "Build canceled, not all required libraries are installed.\n\n";
return 1;
}
$parser = new SourceParser();
$parser->load();
$builder = new Builder($config, $parser);
$builder->build(dirname(__FILE__) . '/../src/', dirname(__FILE__) . '/build/obj/', dirname(__FILE__) . '/build/xournalpp', 'xournalpp');
示例12: testFailingBuild
/**
* Test a failing build
*/
public function testFailingBuild()
{
$this->setExpectedException('\\notifyy\\Exception', \notifyy\Exception::UNKNOWN_ADAPTER);
Builder::build('test');
}
示例13: testBuildErrorObject
/**
* Test build error object
*
* @expectedException \StealThisShow\StealThisTracker\Bencode\Error\Build
*
* @return void
*/
public function testBuildErrorObject()
{
Builder::build((object) array('attribute' => 'something'));
}
示例14: viewDefault
public function viewDefault()
{
$_current = new Builder();
return $_current->build();
}