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


PHP sc_configure函數代碼示例

本文整理匯總了PHP中sc_configure函數的典型用法代碼示例。如果您正苦於以下問題:PHP sc_configure函數的具體用法?PHP sc_configure怎麽用?PHP sc_configure使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了sc_configure函數的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getFooService

 /**
  * Gets the 'foo' service.
  *
  * @return FooClass A FooClass instance.
  */
 protected function getFooService()
 {
     $instance = call_user_func(array('FooClass', 'getInstance'), 'foo', $this->get('foo.baz'), array($this->getParameter('foo') => 'foo is ' . $this->getParameter('foo'), 'bar' => $this->getParameter('foo')), true, $this);
     $instance->setBar($this->get('bar'));
     $instance->initialize();
     sc_configure($instance);
     return $instance;
 }
開發者ID:notbrain,項目名稱:symfony,代碼行數:13,代碼來源:services9.php

示例2: getFooService

 /**
  * Gets the 'foo' service.
  *
  * This service is shared.
  * This method always returns the same instance of the service.
  *
  * @return FooClass A FooClass instance.
  */
 protected function getFooService()
 {
     $a = $this->get('foo.baz');
     $this->services['foo'] = $instance = call_user_func(array('FooClass', 'getInstance'), 'foo', $a, array('bar' => 'foo is bar', 'foobar' => 'bar'), true, $this);
     $instance->setBar($this->get('bar'));
     $instance->initialize();
     $instance->foo = 'bar';
     $instance->moo = $a;
     sc_configure($instance);
     return $instance;
 }
開發者ID:senthil-r-wiredelta,項目名稱:meilleure-visite,代碼行數:19,代碼來源:services9_compiled.php

示例3: getFooService

 /**
  * Gets the 'foo' service.
  *
  * @return FooClass A FooClass instance.
  */
 protected function getFooService()
 {
     $a = $this->get('foo.baz');
     $instance = call_user_func(array('FooClass', 'getInstance'), 'foo', $a, array($this->getParameter('foo') => 'foo is ' . $this->getParameter('foo'), 'bar' => $this->getParameter('foo')), true, $this);
     $instance->setBar($this->get('bar'));
     $instance->initialize();
     $b = new \ReflectionProperty($instance, 'foo');
     $b->setAccessible(true);
     $b->setValue($instance, 'bar');
     $c = new \ReflectionProperty($instance, 'moo');
     $c->setAccessible(true);
     $c->setValue($instance, $a);
     sc_configure($instance);
     return $instance;
 }
開發者ID:nickaggarwal,項目名稱:sample-symfony2,代碼行數:20,代碼來源:services9.php

示例4: getFooService

 /**
  * Gets the 'foo' service.
  *
  * This service is shared.
  * This method always returns the same instance of the service.
  *
  * @return \Bar\FooClass A Bar\FooClass instance.
  */
 protected function getFooService()
 {
     $a = $this->get('foo.baz');
     $this->services['foo'] = $instance = \Bar\FooClass::getInstance('foo', $a, array($this->getParameter('foo') => 'foo is ' . $this->getParameter('foo') . '', 'foobar' => $this->getParameter('foo')), true, $this);
     $instance->setBar($this->get('bar'));
     $instance->initialize();
     $instance->foo = 'bar';
     $instance->moo = $a;
     $instance->qux = array($this->getParameter('foo') => 'foo is ' . $this->getParameter('foo') . '', 'foobar' => $this->getParameter('foo'));
     sc_configure($instance);
     return $instance;
 }
開發者ID:vomasmic,項目名稱:symfony,代碼行數:20,代碼來源:services9.php


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