当前位置: 首页>>代码示例>>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;未经允许,请勿转载。