protected function doCreate($object, StrategyContainer $strategies, ?Context $context = null)
    {
        $command = new CreateCommand($object, $strategies);
        $middlewareChain = $this->middlewareChain;

        return $middlewareChain($command);
    }
protected function doCreate($object, StrategyContainer $strategies, ?Context $context = null)
    {
        $command = new CreateCommand($object, $strategies);
        $middlewareChain = $this->middlewareChain;

        return $middlewareChain($command);
    }
protected function doCreate ( $ object , StrategyContainer $ strategies , ? Context $ context = null ) { $ command = new CreateCommand ( $ object , $ strategies ) ; $ middlewareChain = $ this -> middlewareChain ; return $ middlewareChain ( $ command ) ; }
Creates an File out of the given object.

Since an object might contain other objects that need to be converted the $factory is passed so it can be
used to create nested Elements.

@param FileSystemFile $object path to the file to convert to an File object.
@param StrategyContainer $strategies used to convert nested objects.
@return File
Creates an File out of the given object .