add wp-rocket

This commit is contained in:
nguyen dung
2022-02-18 19:09:35 +07:00
parent 39b8cb3612
commit 3110d00ee7
927 changed files with 271703 additions and 2 deletions

View File

@@ -0,0 +1,23 @@
<?php
namespace WP_Rocket\Engine\Container\Definition;
class CallableDefinition extends AbstractDefinition
{
/**
* {@inheritdoc}
*/
public function build(array $args = [])
{
$args = (empty($args)) ? $this->arguments : $args;
$resolved = $this->resolveArguments($args);
if (is_array($this->concrete) && is_string($this->concrete[0])) {
$this->concrete[0] = ($this->getContainer()->has($this->concrete[0]))
? $this->getContainer()->get($this->concrete[0])
: $this->concrete[0];
}
return call_user_func_array($this->concrete, $resolved);
}
}