当前位置: 首页>>代码示例>>PHP>>正文


PHP B::doSomething方法代码示例

本文整理汇总了PHP中B::doSomething方法的典型用法代码示例。如果您正苦于以下问题:PHP B::doSomething方法的具体用法?PHP B::doSomething怎么用?PHP B::doSomething使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在B的用法示例。


在下文中一共展示了B::doSomething方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: mixItUp

 public function mixItUp()
 {
     return parent::aGenericMethod() . ' ' . parent::doSomething() . ' ' . $this->doSomething();
 }
开发者ID:elagith,项目名称:learningMaterial,代码行数:4,代码来源:Example.php

示例2: Application

$logger1 = new Gelembjuk\Logger\FileLogger(array('logfile' => $logfile, 'groupfilter' => 'all'));
// pass created logger as argument
// after object created and the method called you will see logs in your log file
// at this moment all logs are written
$application1 = new Application($logger1);
$application1->doSomething();
// now wee loggeing from the class B
$b1 = new B($logger1);
$b1->doSomething();
// this shows how to use logger from other class where the trite is used
// object of this class must be set to $this->application property
$c1 = new C($application1);
$c1->doSomething();
unset($application1);
unset($b1);
unset($c1);
// ****** TEST 2 ******
// don't use existent logger, but create it inside
$application2 = new Application(null);
// we set filtering to `construct`. So only logs from constructors will be saved
$application2->initLogger(array('logfile' => $logfile, 'groupfilter' => 'construct'));
$application2->doSomething();
// get logger object reference from application
$b2 = new B($application2->getLogger());
$b2->doSomething();
// this usage is same as above. Doesn't mapper how application created logger
// this class will just reuse it
$c2 = new C($application2);
$c2->doSomething();
$logger = $application2->getLogger();
echo "Now see to your log file!";
开发者ID:gelembjuk,项目名称:logger,代码行数:31,代码来源:index.php


注:本文中的B::doSomething方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。