public function save( $array, $file )
    {
        try
        {
            ob_start( );

            $this->dump( $array );

            $data = ob_get_clean( );

            file_put_contents( $file, $this->filter( self::ON_YAML_SAVE_FILTER, $data, $array, $file ) );
        }
        catch ( \Exception $e )
        {
            throw new YamlException( $e->getMessage( ), $e->getCode( ), $e );
        }
    }
public function save( $array, $file )
    {
        try
        {
            ob_start( );

            $this->dump( $array );

            $data = ob_get_clean( );

            file_put_contents( $file, $this->filter( self::ON_YAML_SAVE_FILTER, $data, $array, $file ) );
        }
        catch ( \Exception $e )
        {
            throw new YamlException( $e->getMessage( ), $e->getCode( ), $e );
        }
    }
public function save ( $ array , $ file ) { try { ob_start ( ) ; $ this -> dump ( $ array ) ; $ data = ob_get_clean ( ) ; file_put_contents ( $ file , $ this -> filter ( self :: ON_YAML_SAVE_FILTER , $ data , $ array , $ file ) ) ; } catch ( \ Exception $ e ) { throw new YamlException ( $ e -> getMessage ( ) , $ e -> getCode ( ) , $ e ) ; } }
Save array as yml to file.

@param array  $array the array to save
@param string $file  file path

@filter ON_YAML_SAVE_FILTER(3)

@throws YamlException on saving problems
Save array as yml to file .