當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Builder::build方法代碼示例

本文整理匯總了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));
 }
開發者ID:raigons,項目名稱:bureauinteligencia,代碼行數:10,代碼來源:ChartBuilderTest.php

示例2: build

 public function build()
 {
     if ($this->builder !== null) {
         $this->builder->build($this->days);
     } else {
         return false;
     }
 }
開發者ID:rasmusrosengren,項目名稱:CAS,代碼行數:8,代碼來源:DependencyInjection.php

示例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);
}
開發者ID:remo-candeli,項目名稱:remoc-test,代碼行數:29,代碼來源:calcola_costi.php

示例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) : [];
 }
開發者ID:mablae,項目名稱:alice,代碼行數:17,代碼來源:Loader.php

示例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;
 }
開發者ID:devster,項目名稱:alice,代碼行數:17,代碼來源:Loader.php

示例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;
 }
開發者ID:hpbuniat,項目名稱:mergy,代碼行數:21,代碼來源:Aggregator.php

示例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);
    }
}
開發者ID:amorwilliams,項目名稱:Quick-Cocos2dx-Community,代碼行數:17,代碼來源:compile_luabinding_functions.php

示例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();
開發者ID:tonyshark1,項目名稱:Billiard-2D,代碼行數:30,代碼來源:build.php

示例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;
}
開發者ID:lautr3k,項目名稱:Straw,代碼行數:31,代碼來源:index.php

示例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);
開發者ID:remo-candeli,項目名稱:remoc-test,代碼行數:21,代碼來源:prenotazione_startup.php

示例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');
開發者ID:cass00,項目名稱:xournalpp,代碼行數:17,代碼來源:build.php

示例12: testFailingBuild

 /**
  * Test a failing build
  */
 public function testFailingBuild()
 {
     $this->setExpectedException('\\notifyy\\Exception', \notifyy\Exception::UNKNOWN_ADAPTER);
     Builder::build('test');
 }
開發者ID:hpbuniat,項目名稱:notifyy,代碼行數:8,代碼來源:BuilderTest.php

示例13: testBuildErrorObject

 /**
  * Test build error object
  *
  * @expectedException \StealThisShow\StealThisTracker\Bencode\Error\Build
  *
  * @return void
  */
 public function testBuildErrorObject()
 {
     Builder::build((object) array('attribute' => 'something'));
 }
開發者ID:StealThisShow,項目名稱:StealThisTracker,代碼行數:11,代碼來源:BuilderTest.php

示例14: viewDefault

 public function viewDefault()
 {
     $_current = new Builder();
     return $_current->build();
 }
開發者ID:astar3086,項目名稱:studio_logistic,代碼行數:5,代碼來源:Director.php


注:本文中的Builder::build方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。