示例#1
0
 function __construct($options = null, ZendOAuth\Consumer $consumer = null, Http\Client $httpClient = null)
 {
     $this->containerd = ArrayUtils::at($options, 'containerd', null, function () {
         return new Containerd();
     });
     parent::__construct(...\func_get_args());
 }
示例#2
0
 /**
  * @see http://docs.ruby-lang.org/ja/2.2.0/method/File/s/join.html
  */
 static function join(...$path_segments)
 {
     $path_segments = ArrayUtils::flatten($path_segments);
     $is_absolute_path = static::is_absolute_path($path_segments[0]);
     foreach ($path_segments as &$path_segment) {
         $path_segment = \trim($path_segment, \DIRECTORY_SEPARATOR);
     }
     $path_segments = \array_filter($path_segments, '\\strlen');
     $path_segments = \implode(\DIRECTORY_SEPARATOR, $path_segments);
     return ($is_absolute_path ? \DIRECTORY_SEPARATOR : '') . $path_segments;
 }