public function generate($idChain,$name,array $options = []) {
        $chainModel = $this->resolveChainModel($idChain, $options);
        
        $modelDocument = $chainModel->getModel($name);
        if(isset($options["fileName"]) && !empty($options["fileName"])){
            $modelDocument->setFileName($options["fileName"]);
            unset($options["fileName"]);
        }
        $pathFileOut = $modelDocument
                ->setChainModel($chainModel)
                ->write($options["data"]);
        
        if($pathFileOut === null){
            throw new RuntimeException(sprintf("Failed to generate document '%s' with name '%s'",$idChain,$name));
        }
        if(!is_readable($pathFileOut)){
            throw new RuntimeException(sprintf("Failed to generate document '%s' with name '%s'. File '%s' is not readable.",$idChain,$name,$pathFileOut));
        }
        return $pathFileOut;
    }
public function generate($idChain,$name,array $options = []) {
        $chainModel = $this->resolveChainModel($idChain, $options);
        
        $modelDocument = $chainModel->getModel($name);
        if(isset($options["fileName"]) && !empty($options["fileName"])){
            $modelDocument->setFileName($options["fileName"]);
            unset($options["fileName"]);
        }
        $pathFileOut = $modelDocument
                ->setChainModel($chainModel)
                ->write($options["data"]);
        
        if($pathFileOut === null){
            throw new RuntimeException(sprintf("Failed to generate document '%s' with name '%s'",$idChain,$name));
        }
        if(!is_readable($pathFileOut)){
            throw new RuntimeException(sprintf("Failed to generate document '%s' with name '%s'. File '%s' is not readable.",$idChain,$name,$pathFileOut));
        }
        return $pathFileOut;
    }
public function generate ( $ idChain , $ name , array $ options = [ ] ) { $ chainModel = $ this -> resolveChainModel ( $ idChain , $ options ) ; $ modelDocument = $ chainModel -> getModel ( $ name ) ; if ( isset ( $ options [ "fileName" ] ) && ! empty ( $ options [ "fileName" ] ) ) { $ modelDocument -> setFileName ( $ options [ "fileName" ] ) ; unset ( $ options [ "fileName" ] ) ; } $ pathFileOut = $ modelDocument -> setChainModel ( $ chainModel ) -> write ( $ options [ "data" ] ) ; if ( $ pathFileOut === null ) { throw new RuntimeException ( sprintf ( "Failed to generate document '%s' with name '%s'" , $ idChain , $ name ) ) ; } if ( ! is_readable ( $ pathFileOut ) ) { throw new RuntimeException ( sprintf ( "Failed to generate document '%s' with name '%s'. File '%s' is not readable." , $ idChain , $ name , $ pathFileOut ) ) ; } return $ pathFileOut ; }
Genera un documento de un modulo
@param type $idChain
@param string $name Nombre del documento pre-definido
@param array $options
@return string La ruta del archivo generado
@throws RuntimeException
Genera un documento de un modulo